This is the 2nd part of series about internal details of Document ID activation, part 1 is here. We finished on the fact that you need to wait at least 0,5h or change system time before to run “Document ID enable/disable” job. Let’s continue investigation and will check what happens after that.
After activation of “Document ID Service” feature, Document ID settings page becomes available in Site settings page. After feature activation it will look like this:
As mentioned in part 1 now we will temporary change system time: add 1 hour to the current time and reset Sharepoint Timer service. After that go to CA > Monitoring > Job definitions > “Document ID enable/disable” job (for appropriate web application) and click Run now. If you will click on Running jobs after that you should see progress bar for "Document ID enable/disable" job (if you would run it before time specified in DeliveryDate column you would only see in Jobs history that "Document ID enable/disable job" ran 00:00:00, i.e. exited immediately after started):
If you will execute the same Sql query which we used in part 1 after job will be finished it should not return any rows:
At this moment if you will check Document ID settings page it will look like this:
I.e. now it will have value in "Begin IDs with the following characters" field. But also it shows the warning:
Configuration of the Document ID feature is scheduled to be completed by an automated process.
It means that feature activation still not finished. It happens because “Document ID enable/disable” job creates another work item with type A83644F5-78DB-4F95-9A9D-25238862048C. In order to check it execute the following Sql query:
It runs with the following params which is specified in TextPayload column of ScheduledWorkItems table:
This work item is processed by "Document ID assignment" job. This item is added by "Document ID enable/disable" job and sets values in Document ID field for all existing documents on the site. Here we also should pay attention on value in DeliveryDate column. It should be near the time when you forced "Document ID enable/disable" job on previous step. As we didn't change time back yet in order to execute this work item just force it in Central administration. You should see "Document ID assignment" job progress in Running jobs:
and after some time work item should be removed from ScheduledWorkItems table (you can check it by running Sql query shown above).
After that you may change system time back and reset Sharepoint Timer service. If you will now go to Site settings > Document ID settings it should not show red warning text anymore.
But "Begin IDs with the following characters" field will still contain the same random string:
If you need to change Document ID prefix to your own value, you will need to go through whole process again. After you will click Ok work item with type 749FED41-4F86-4277-8ECE-289FBF18884F with the following parameters:
(In this example TEST prefix is used). And work item with type A83644F5-78DB-4F95-9A9D-25238862048C and params:
After both jobs will be finished, add some document into document library. When you will click View properties, to should see Document ID field – link with text “TEST-1-1” which points to http://example.com/_layouts/15/DocIdRedir.aspx?ID=TEST-1-1 url:
I.e. now you can use OTB Document ID field in document content types. This is the end of the series. Hope that this information will help you in the work.