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 6020987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:38:51+00:00 2026-05-23T03:38:51+00:00

We have the sharepoint 2010 environment with Document ID’s enabled. Given (part of) a

  • 0

We have the sharepoint 2010 environment with Document ID’s enabled.

Given (part of) a Doc ID, we want to programmatically retrieve the document(s) matching that ID. The problem seems to be that this column is rather special, in that it might need special handling.

Using an SPSiteDataQuery, fetching the _dlc_DocId field as part of the viewfields works fine. However, including it as part of the where query never results in any documents being fetched.

Using the Search API has gotten us nowhere at all.

Has anyone pulled this off, or any suggestions on how to tackle this problem?

[Update] Turns out we were fooled by subtle errors in the XML and bad debugging misinterpretations. This stuff just works fine.

  • 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-23T03:38:52+00:00Added an answer on May 23, 2026 at 3:38 am

    I don’t normally contribute to these sorts of things because cleverer people than I always get there before me, but as this is an old one with no proper answer I think I’ll add my thoughts for those who find this page.

    I was struggling with this but after a little digging around and learning a bit of Caml I got this working.
    I am using the SharePoint Client Object Model against SharePoint 2010 and Office365 beta.

    Start off your query by looking at the all list items query:

    Microsoft.SharePoint.Client.CamlQuery.CreateAllItemsQuery().ViewXml

    "<View Scope=\"RecursiveAll\">\r\n <Query>\r\n </Query>\r\n</View>"

    Stick a where child inside the query

    Then add in

    <Eq><FieldRef Name="_dlc_DocId" /><Value Type="Text">MDXC2KE55ASN-3-80</Value></Eq>

    replacing MDXC2KE55ASN-3-80 with the doc ID you are looking for inside the where.

    Also don’t forget you might want to make use of these too:

    <ViewFields><FieldRef Name="_dlc_DocId" /></ViewFields>

    <RowLimit>1</RowLimit>

    Then use List.GetItems() method to bring back the ListItemCollection.

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

Sidebar

Related Questions

No related questions found

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.