You are on page 1of 5

Records Management features in SharePoint 2010: Part 2 Document IDs


A Document ID is a unique identifier for a document within a SharePoint 2010 site collection SharePoint 2010 now provides a static URL or permalink that opens the document associated with the ID, regardless of the location

SharePoint 2010 includes new Site Collection scoped Feature called the Document ID Service. To enable feature you can go to Site Settings --> Site Collection Features or you can launch the SharePoint 2010 Management Shell and run the following:

Enable-SPFeature -id docid -url <site collection url>

Document ID Capabilities:

Upon activation of this feature, a new link appears under: Site Settings --> Site Collection Administration called Document ID Settings

Settings allow the custom assignment of Document IDs with certain character prefixes Settings allow the resetting of all Document IDs within the Site Collection (via daily timer jobs)

Document ID enable/disable job

creates the Document ID column in the Document content type & Document ID list column available in every document library within site collections where the feature has been activated

Document ID assignment job

Assigns Document IDs to any existing documents within site collection.

To force run these jobs go into Central Administration > Monitoring > Review job definitions > click the two jobs for the appropriate web application

Settings also allow user to select a scope to be able to input a specific Document ID in and have it pull up the document directly from this search scope index (i.e. a frequently updated index)

Find by Document ID Web Part enables user to enter a Document ID, then constructs a "static URL" and looks up the item, this web part is located under (Site Actions > Edit Page > Insert (from Ribbon) > Web Part > Search Category > Find by Document ID)

Properties of each document within a document library now has a field called Document ID:

**Note: After activating Doc ID feature for existing documents within site collection, an action needs to be taken on document to cause the Document ID to appear (i.e. like check-in/check-out.)

The Document ID URL now looks like this:


This is a new SharePoint 2010 application ASPX page that sits in the layouts directory and is called DocIdRedir.aspx that takes a Document ID as query string parameter.

This gives the ability to consistently reference documents as on document movement the document ID URL link does'nt change or break, even if the document moves between sites!

Developers now have the ability to create their own Document ID provider if they want to generate doc ids in a specific way, they would derive from the:


public class MyDocumentIdProvider : Microsoft.Office.DocumentManagement.DocumentIdProvider { // Generate doc id we want here public override string GenerateDocumentId(SPListItem listItem) { return MyClass.GenerateDocId(); } // Use default search or call GetDocumentUrlsById before search public override bool DoCustomSearchBeforeDefaultSearch { get { return false; }

} // implement logic to find documents if default search doesn't suffice public override string[] GetDocumentUrlsById(SPSite site, string documentId) { return new string[] { }; } // return default doc id initially displayed in doc id search web part public override string GetSampleDocumentIdText(SPSite site) { return "RezCorp-888--CUSTOMID"; } } References: