The Unique Document ID feature

Enjoyed some time off due to the birth of my 3rd child Emma and finally found some time to get away from the diapers and constant nursering. 😉 And what a time to be back.

SharePoint Server 2010 is almost RTM, so an in-depth investigation of this new version of one the most important Microsoft products is long overdue.

In the following blog posts, I will review some of the new features of SharePoint Server 2010. Targeted far more at the Enterprise, SharePoint Server 2010 aims to remove some of the headaches that SharePoint 2007 had for both end users and developers, while maintaining its basic power, easy information sharing.

SharePoint Server 2010 introduces a lot of new features and functionalities. Some of them are improvements of existing functionality, some are completely new. Clear from a first glance though is that SharePoint Server 2010 has grown up and matured. Enhancements and new features make the new version far more scalable in large enterprises, one of the shortcomings of SharePoint 2007.

Unique Document ID feature

When using SharePoint as a document management solution, one of the shortcomings of SharePoint 2007 was the absence of a unique identifier for the document, regardless of its location. Sure, beneath the service, SharePoint 2007 did assign a GUID (Global Unique Identifier) to a document upon upload or creation, but there were no means to retrieve a document based on this GUID if you did not now the document library it was located in.

While SharePoint 2007 focused on libraries and lists, SharePoint 2010 moves more to sites (collections) and site pages. Several enhancements allow the site collection to share its information across the sites located in the collection.

The Unique Document ID feature can be enabled on site collection level, using site collection features. Once enabled, all documents placed within document libraries on the site collection will also receive a unique identifier field containing the ID of the document.

Based on search

The lookup of documents based on their ID is based on the Search functionality of SharePoint. First, the runtime will call the search provider to find the document. If search returns no documents, the provider calls a custom method for an alternative lookup. Because of the search dependency, when you move a document, it will not be found based on his ID unitl the next incremental crawl. Definitly something to take into account.


When enabling the unique ID feature, we can also influence the way SharePoint assigns these unique identifiers. Unfortunately, these options are quite limited, as we can also specify text that each identifier should start with. However, because of the site collection scope, this problem is to overcome.

If you do not feel comfortable with the way SharePoint generates the ID’s, or you have specific rules or conventions to follow when generating these ID’s, it is good to know that you can create your own document ID provider. The way to do this is to create a subclass of the Microsoft.Office.DocumentManagement.DocumentIdProvider class and implement his methods. You can also specify that you want your own lookup method to be to called first, instead of the search. Using a site collection feature receiver, you can hook up this custom provider to the site collection by calling

DocumentId.SetProvider(properties.Feature.Parent as SPSite,new MyNewAndImprovedDocumentIdProvider());

Sending links

So, each document now haves a unique ID. Great, so how can we utilize that? When viewing the properties of a document now, you will find an additional field Document ID containing the unique ID of the document. This is also a link, pointing to the unique document ID service that can look up the document.

The link points to an aspx page located in the layouts folder called DocIdRedir.aspx. To recover a document based on the ID, just call http://yoursite/_layouts/DocIdRedir.aspx?ID=documentID
Interesting though is that when you press the Send a link button, the mail containing the link still contains the original url, pointing to the current location of the document. Obviously, when moving the document, the link would not be valid anymore.

The Ribbon

With SharePoint 2010, the ribbon is introduced in the online suite space. The ribbon and its contents will be subject for discussion in another blog post, but interesting now is that we can modify the ribbon items. We can therefore include a button that also send a link, but sends the permanent link, rather than the original one. I would have expected such a button to be there by default, but hey, we also need some work don’t we?

Till next time.

24 thoughts on “The Unique Document ID feature”

  1. Hi there! This post could not be written any better!
    Reading through this article reminds me of my
    previous roommate! He constantly kept preaching about this.

    I am going to forward this article to him. Pretty sure
    he’ll have a very good read. I appreciate you for sharing!

  2. Wow that was strange. I just wrote an really long comment
    but after I clicked submit my comment didn’t appear. Grrrr… well I’m not
    writing all that over again. Regardless, just wanted to say fantastic blog!

  3. Hello are using WordPress for your site platform?

    I’m new to the blog world but I’m trying to
    get started and create my own. Do you require any html coding expertise to
    make your own blog? Any help would be really appreciated!
    Much appreciated info!

  4. Hi, I believe your site could possibly be having web browser
    compatibility issues. Whenever I look at your website in Safari, it
    looks fine however, if opening in I.E., it’s got some overlapping issues. I just wanted to provide you with a quick heads up! Aside from that, fantastic site!

  5. Hey there! Quick question that’s entirely off topic.
    Do you know how to make your site mobile
    friendly? My blog looks weird when browsing from my apple iphone.

    I’m trying to find a template or plugin
    that might be able to correct this issue.
    If you have any suggestions, please share. With thanks!

  6. Aw, this was an incredibly good post. Taking the time and actual
    effort to produce a great article… but what can I say… I put things off a lot and never seem to get
    nearly anything done.

  7. Hello fantastic website! Does running a blog lioe this require a lott oof
    work? I’ve very little understanding of computer programming
    but I was hoping to start my own blog in the near
    future. Anyhow, should you have any recommendations or tips
    for nnew blog owners please share. I know this is off subject however I simply
    had to ask. Cheers!

  8. Hey would you mind letting me know which webhost you’re utilizing?
    I’ve loaded your blog in 3 completely different browsers
    and I must say this blog loads a lot quicker then most.
    Can you recommend a good internet hosting provider at a honest price?
    Many thanks, I appreciate it!

  9. Have you ever thokught about publishing an ebook or guest authoring onn other sites?
    I have a blog centered on the same topics you discuss and would really like to have you share some stories/information. I know my readers would appreciate your work.
    If you’re even remotely interested, feel free to shot me an e mail.

  10. Hi! This is kind of off topic but I need some advice from an established blog.
    Is it tough to set up your own blog? I’m not very techincal but I can figure things out pretty quick.

    I’m thinking about setting up my own but I’m not sure where to begin. Do
    you have any ideas or suggestions? Thanks

  11. My partner and I absolutely love your blog and find nearly all of
    your post’s to be just what I’m looking for.
    Does one offer guest writers to write content for you personally?
    I wouldn’t mind publishing a post or elaborating on most of the subjects you write concerning here.
    Again, awesome web log!

  12. Hi there very cool web site!! Man .. Beautiful ..

    Amazing .. I’ll bookmark your website and take the feeds additionally?
    I am glad to seek out numerous useful info right
    here within the put up, we’d like work out extra techniques on this regard, thanks
    for sharing. . . . . .

  13. It means that you get total discounts at the time of subscription. Figure out what it is you need and want and from there shop around to see what web hosts matches these expectations.
    These connections and resource sharing can even be made across different operating
    systems such as Unix, Linux and Microsoft Windows.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s