In a farm I have many site collections and I am sending documents from each site collection to a Library in Record Centre site collection.

I have also enabled the Document ID Service.

Now in a library of Record Centre where records(i.e. Documents) are dumped from n number of site collections. Is there a way I can identify the source site collection and library of each record(i.e. Document)?


I have read on blogs that the Document ID of a document generated via Document Id Service Site Collection Feature can be customized, which seems to have potential in solving my problem. I have read How to Create a Custom Document-ID Provider with SharePoint 2013. But this is totally a server side solution.

I am on SharePoint Online office365. Do we have ability to create Custom Document-ID Provider using CSOM?


Yet again a QUEST is solved. How can we know the Source of a record in a library in Record Centre?

Platform: Office 365 (But I believe this will work on SharePoint 2013 on premise as well)

Scenario: There are more than 50 site collections and Record Centre is one of them. From the Site collections we are dumping documents as records in Record Centre. And in the view of a library in Record Centre we would like to know the source of the record(i.e. from which site collection it has come from).


To understand the approach let us assume a normal site collection and a record centre site collection. And From a normal site collection we will be sending documents to record centre site collection.

  • Things to do at Site collection: First we need to activate the Document ID service feature. Goto site settings > Site Collection Features > Activate Document ID Service
  • Update Document ID settings: We can set the prefix of the Document ID generated for each site collection to maintain uniqueness. Goto Site Settings > Site Collection Administration > Document ID Settings

enter image description here

Performing above steps when ever a document is uploaded it will have a unique Document Id. Refer below screen shot.

enter image description here

If we try to break the Id N3SITE-424387581-13 we can notice that

  1. N3SITE: is the prefix which we have in Document ID settings.
  2. 424387581: Is the random number generated by SharePoint.
  3. 13: is nothing but the normal ID of a document.

N3SITE and 13 are quite easy to understand and they are in our control to identify which site collection. But 424387581 puzzle us, and also from site collection which library it belongs we would also like to know that.

424387581 is nothing but the unique Id given to a document library. but from where we got to know it?

Cracking down curious case of 424387581: Open your office 365 site collection in SharePoint Designer. From ribbon control click on Site Options which is a property bag. Find the property docid_msft_hier_listidx, this contains the unique id for all the document libraries.

enter image description here

<?xml version="1.0" encoding="utf-16"?>

This solves our problem of identifying the Document Source.

On Record Centre: On a view of a record library which contains records having Document ID, we can place a link which will open a new window passing Document ID in query string.

and on that window we can write our own logic first to break down the Document ID to get the prefix and identify which Site Collection is it. And second query that site collection's property bag using JSOM and check 424387581 belongs to which document library.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.