{"id":1883,"date":"2012-05-14T05:35:03","date_gmt":"2012-05-14T05:35:03","guid":{"rendered":"https:\/\/poiseddevelopers.com\/reality-tech\/?p=1883"},"modified":"2024-05-13T10:30:16","modified_gmt":"2024-05-13T10:30:16","slug":"sharepoint-document-ids","status":"publish","type":"post","link":"https:\/\/poiseddevelopers.com\/reality-tech\/sharepoint-document-ids\/","title":{"rendered":"SharePoint Document IDs"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_65 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title \" >Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 eztoc-toggle-hide-by-default' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/poiseddevelopers.com\/reality-tech\/sharepoint-document-ids\/#SharePoint_Document_IDs\" title=\"SharePoint Document IDs\">SharePoint Document IDs<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/poiseddevelopers.com\/reality-tech\/sharepoint-document-ids\/#Setting_Document_ID\" title=\"Setting Document ID\">Setting Document ID<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"SharePoint_Document_IDs\"><\/span>SharePoint Document IDs<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The SharePoint Document ID Service is a new feature of SharePoint 2010 that offers a number of useful capabilities but carries some limitations.\u00a0 Let\u2019s dig a bit deeper and see what it does and how it works.<\/p>\n<p>One challenge for SharePoint users is that links tend to easily break. Rename a file or folder, or move the document, and a previously saved or shared link will not work.<\/p>\n<p>By tagging a document with an ID, SharePoint can start referencing documents using this ID, even when the underlying structure beneath it has changed.<\/p>\n<p>SharePoint can accept a link with this ID, by referencing a dedicated page on each site that takes care of finding the the document.<\/p>\n<p>This page is named DocIDRedir.aspx.\u00a0 Here\u2019s what a URL might look like:<\/p>\n<p>\u201chttp: \/\/%3csitecollection%3e\/%3cweb%3e\/_layouts\/DocIdRedir.aspx?ID=XXXX\u201d<\/p>\n<p>There\u2019s also a Document ID web part that\u2019s available for users to enter a Document ID.<\/p>\n<p>This is used most prominently when creating a Records Center site, which is based on an out-of-box website template.<\/p>\n<p>The Document ID Service is enabled at the Site Collection level and assigns Document IDs that are unique\u00a0<em>only<\/em>\u00a0within the site collection.<\/p>\n<p>There is a prefix available for configuration that is most useful when assigned uniquely for each Site Collection to ensure uniqueness across your web application and even farm.<\/p>\n<p>If you have more than one farm, it makes sense to provide an embedded prefix to indicate the farm, to ensure uniqueness globally.<\/p>\n<p>One significant aspect of SharePoint\u2019s architecture is its extensibility through custom development.<\/p>\n<p>Organizations often leverage the expertise of a SharePoint development company like Reality Tech to tailor SharePoint to their specific needs.<\/p>\n<p>These\u00a0<strong><a href=\"https:\/\/reality-tech.com\/services\/sharepoint-development-services\/\" target=\"_blank\" rel=\"noopener\" aria-label=\"SharePoint development services - open in a new tab\" data-uw-rm-ext-link=\"\">SharePoint development services<\/a><\/strong>\u00a0can include custom workflows, integrations with other systems, and user interface enhancements, all of which can benefit from the stability and reliability provided by SharePoint Document IDs.<\/p>\n<blockquote class=\"blockquote-blog\">\n<div class=\"left\">\n<div style=\"background-color: white; box-shadow: 0 0 10px whitesmoke; padding: 20px; width: 800px;\">\n<h4 style=\"color: black;\">Additional Read<\/h4>\n<p><a style=\"color: #1f6799;\" href=\"https:\/\/reality-tech.com\/how-to-set-up-sharepoint-document-management-the-step-by-step-guide\/\" target=\"_blank\" rel=\"noopener\" data-uw-rm-brl=\"false\">How to Set Up SharePoint Document Management \u2013 The Step-By-Step Guide!<\/a><\/p>\n<\/div>\n<\/div>\n<\/blockquote>\n<h2><span class=\"ez-toc-section\" id=\"Setting_Document_ID\"><\/span><strong>Setting Document ID<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Once the Document ID Service is enabled, every new or edited document instantly gets a Document ID assigned.<\/p>\n<p>However, historical documents do not get an immediate Document ID assignment.\u00a0 The assignment of Document IDs to documents that were uploaded prior to this service being enabled are assigned by a Timer Job called the \u201cDocument ID assignment job\u201d that exists at the Web Application level.<\/p>\n<p>By default, this job runs nightly.\u00a0 This is one of two jobs associated with the Document ID Service, the other being the \u201cDocument ID enable\/disable job \u201c<\/p>\n<p>When the Document ID Service is enabled for a Site Collection, Event Receivers are automatically installed in each Document Library.<\/p>\n<p>Actually, there is a set of Event Receivers installed for each and every Content Type configured within that document library.<\/p>\n<p>The Event Receiver is called \u201cDocument ID Generator\u201d and is configured to be fired synchronously.\u00a0<a href=\"https:\/\/reality-tech.com\/encoding-and-decoding-urls\/\" target=\"_blank\" rel=\"noopener\" aria-label=\"How to add location link in pdf - open in a new tab\" data-uw-rm-ext-link=\"\"><strong>How to add location link in pdf<\/strong><\/a><span data-sheets-value=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;how to add location link in pdf&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:6723,&quot;3&quot;:{&quot;1&quot;:0},&quot;4&quot;:{&quot;1&quot;:2,&quot;2&quot;:16777215},&quot;9&quot;:0,&quot;12&quot;:0,&quot;14&quot;:{&quot;1&quot;:2,&quot;2&quot;:-570425344},&quot;15&quot;:&quot;Roboto, RobotoDraft, Helvetica, Arial, sans-serif&quot;}\">, t<\/span>here is a separate Event Receiver for the following events:<\/p>\n<ul>\n<li>ItemAdded<\/li>\n<li>ItemUpdated<\/li>\n<li>ItemCheckedIn<\/li>\n<li>ItemUncheckedOut<\/li>\n<\/ul>\n<p>Once a Document ID is assigned, it is changeable through the Object Model, although do so at your own risk.<\/p>\n<p>Before the Document\u00a0 ID Service is enabled, the Document ID field does not exist to be assigned. If you are migrating from a legacy system that has existing Document IDs, you can first migrate the documents, then the Document ID service is enabled.<\/p>\n<p>This adds the internal Document ID field.\u00a0 Then before the daily Document ID Assignment job runs (better yet, disable it during this process), we can programmatically take the legacy Document IDs and assign their values to the SharePoint Online IDs.<\/p>\n<p>With the Document ID field populated, the Document ID Service will not overwrite the already set Document IDs.<\/p>\n<p>Note that part of the Document ID Service is to redirect URLs referencing the Document ID.<\/p>\n<p>It turns out, if you manually assign duplicate Document IDs (something that in theory should never occur), the daily Document ID Assignment Job detects this situation, and the DocIDRedir.aspx redirects to a site-based search page that passes in the Document ID.<\/p>\n<blockquote class=\"blockquote-blog\">\n<div class=\"left\">\n<div style=\"background-color: white; box-shadow: 0 0 10px whitesmoke; padding: 20px; width: 800px;\">\n<h4 style=\"color: black;\">Additional Read<\/h4>\n<p><a style=\"color: #1f6799;\" href=\"https:\/\/reality-tech.com\/why-you-should-use-sharepoint-for-document-management-system\/\" target=\"_blank\" rel=\"noopener\" data-uw-rm-brl=\"false\">Why You Should Use SharePoint for Document Management System<\/a><\/p>\n<\/div>\n<\/div>\n<\/blockquote>\n<p>Under the covers there are three internal components to a Document ID:<\/p>\n<ul>\n<li>_dlc_DocIdUrl: fully qualified URL for document referencing the DocIDRedir.aspx along with the lookup parameter<\/li>\n<li>_dlc_DocId: The Document ID.\u00a0 This is the internal property you can directly address and assign as $item[\u201c_dlc_DocId\u201d]<\/li>\n<li>_dlc_DocIdItemGuid: DocID related GUID<\/li>\n<\/ul>\n<p>That completes our tour of the Document ID Service.\u00a0 I look forward to hearing of others\u2019 experiences with it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SharePoint Document IDs The SharePoint Document ID Service is a new feature of SharePoint 2010 that offers a number of useful capabilities but carries some limitations.\u00a0 Let\u2019s dig a bit deeper and see what it does and how it works. One challenge for SharePoint users is that links tend to easily break. Rename a file [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":1885,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[23],"tags":[],"class_list":["post-1883","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-records-management"],"acf":[],"_links":{"self":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/1883","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/comments?post=1883"}],"version-history":[{"count":4,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/1883\/revisions"}],"predecessor-version":[{"id":3939,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/posts\/1883\/revisions\/3939"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/media\/1885"}],"wp:attachment":[{"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/media?parent=1883"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/categories?post=1883"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/poiseddevelopers.com\/reality-tech\/wp-json\/wp\/v2\/tags?post=1883"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}