Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3345192
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:09:26+00:00 2026-05-18T01:09:26+00:00

I have an external sharepoint site, where I need to update the metadata of

  • 0

I have an external sharepoint site, where I need to update the metadata of a large set of files. The best way to do this seems to be using the Lists web service, and using the Lists.UpdateListItems method. However, this method requires the ID of the document on the server, information I don’t have. I do have the filepath/filename of the document.

What is the best way to obtain the doc ID using its name/path?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T01:09:26+00:00Added an answer on May 18, 2026 at 1:09 am

    If you need to go with the web service, you will probably have to go with SPQueries (CAML) to get the items you want.

    The Lists.asmx web service (located under http://sitecollection/_vti_bin/Lists.asmx) has a function called GetListItem that takes a Query as a parameter.

    I don’t really know the inner workings of your list, but something like this query should do it :

    XmlDocument camlDocument = new XmlDocument();
    XmlNode queryNode = camlDocument.CreateElement("Query");
    queryNode.InnerXml = "<Where>"
    + "<Eq><FieldRef Name='FileName' /><Value Type='Text'>{Your Filename Here}</Value></Eq>"
    + "</Where>";
    
    XmlNode viewFieldsNode = camlDocument.CreateElement("ViewFields");
    viewFieldsNode.InnerXml = "<FieldRef Name='ID' />";
    
    XmlNode queryOptionsNode = camlDocument.CreateElement("QueryOptions");
    
    resultNode = _sharepointSite.ListsWS.GetListItems(listName, viewName,
    queryNode, viewFieldsNode, rowLimit, queryOptionsNode, webID);
    

    The _sharepointSite and ListWS objects are your web serivce objects (they should be generated automatically for you when you add your web reference).

    The listName is the name of your list on the site collection

    The viewName is the name of the view you want to query on (make sure you have a view that shows all elements if you want to query on everything. I usually rely on hidden views to make sure that users don’t change them)

    RowLimit is just an int.

    You should have no problem finding the ID of the web you are working on with the web service.

    The XML that you will get back is not that straight forward and will need special attention. More informat

    Note that if you are dealing with nested folders, you will want to add the following code :

    XmlNode queryOptionsNode = camlDocument.CreateElement("QueryOptions");
    queryOptionsNode.InnerXml = "<ViewAttributes Scope=\"Recursive\" />";
    

    More information on what I explained here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to show an external site through our sharepoint portal and have added
I have this code: using ( var site = new SPSite( myUrl ) )
I'm going to need to push and pull files from a SharePoint site that
I need the community's help on this. We have TFS 2010 and SharePoint services
I have a need to create a transactional process using an external API that
i have created a sharepoint site urls: internal url : http://orbsp:2323 external url :
I have a SharePoint external list that points to a 100,000 record SQL table.
I have external html5 canvas that you can paint on some lines using your
I would like to have external proofreaders to work directly inside my Drupal site.
I have an external distance object ( gdis ) and need to convert it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.