No me hago responsable si copiaste mal algún código que sale en las páginas de este sitio.
Ojalá sea de ayuda para más de alguno este sitio.
Se agradece si deja algún comentario.

jueves, 2 de diciembre de 2010

Document ID no es único en SharePoint 2010

Ref: http://www.hartsteve.com/2010/08/sharepoint-2010-document-id-non-uniqueness/


Straight Talk
I’ll start by saying it straight up: SharePoint 2010 Document IDs are not guaranteed to be unique.  If you route a document from one site collection to another, where the target site collection uses the same document ID prefix, then you could end up with duplicate document IDs.  And worse is that if you search for documents using a duplicate document ID, SharePoint will only return the first match.
Document ID Good Intentions
The new Document ID feature in SharePoint 2010 is one of many great additions to the SharePoint platform.  The generation and assignment of document IDs to content, and having control over the document ID format address a common request I’ve fielded from clients requiring automated assignment of unique document IDs.  Sure, there’s always been a unique ID assigned to each document but it was a GUID.  Asking users to use GUIDS is one way to loose the love.
How to Cook Up Duplicate Document IDs
  1. Create two new site collections and enable the “Document ID” and “Content Organizer” features in each.  I’ll refer to one site collection as the source and the 2nd one as the target.
  2. Configure the “Document ID” settings for each site collection using the same prefix.  For example:sp2010_docid_settings
  3. Configure the content organizer in the source site collection to route documents to the target site collection.  This will require a “Send To” connection to be created in Central Administration that points to the target site collection.  This will also require a target site collection content organizer rule that drops incoming documents into the document library.
  4. In the target site collection, upload a single document into the document library; a document ID will be assigned to that document.
  5. In the source site collection, upload several documents to the “Drop Off Library”.  Those documents should be routed to the target site collection if the content organizer rule has been correctly configured.When you look at the documents in the target document library, you should see the duplicate document IDs.  For example:
    sp2010_dup_lib_docids
Duplicate Document ID Search Misses
If you end up with duplicate document IDs (and you don’t have to, as I’ll explain later), and you search for a document with a duplicated ID, then only the first match will be returned.  That applies to both document ID search mechanisms:
  • The document ID “redirect” URL “_layouts/DocIdRedir.aspx?ID=<doc id>”.
  • The “Find by Document ID” web part.
If searching for content by document IDs is a key search use case for an organization, then ending up with duplicate IDs may make it difficult to locate content having duplicated document IDs.
It’s especially problematic if external systems need to store a link to the document using the document ID “redirect” URL.  Should the link reference a document with a duplicate doc ID, then the system/process could pull the wrong document (i.e. pulling the first match when the desired document is another document with the same ID).
All Doom and Gloom in Document ID Land?
No.  The SharePoint 2010 Document ID feature is still a great addition to the product.  Hopefully upcoming service packs will correct this issue and ensure that incoming duplicate doc IDs are updated to make then truly unique.
To prevent duplicate document IDs, ensure that every site collection that uses the document ID feature has a unique prefix (configured in the Document ID settings).  This should guarantee that all your documents where ever they may be routed in your farm, are assigned unique document IDs.
Writing a custom document ID provider is the other approach to ensuring the generation of unique document IDs.  The custom provider code could be implemented to derive a farm-wide unique identifier to ensure uniqueness across all farm site collections without the need to specify unique ID prefixes for each site collection.

No hay comentarios:

Publicar un comentario