I have a problem that i've struggled with for a long time. This problem manifests itself in the test environment, but not in my dev environment.
I have a document library template. In a event handler I attach several content types (which all inherit from a base content type which in turn inherits from Document). The base content type has a custom document template, and event handlers defined in xmldocuments on the contenttype definition.
The Doc-ID feature is switched on in the site.
When uploading a file to the document library, the document is assigned a document ID as expected. When saving a file from Word however, the doc-ID is blank. Apparently the value is set on the item, because when changing the content type of the item afterwards, the doc-ID appears with a number indicating that it was assigned when the file was first saved. When setting the contenttype back to the original value, the Doc-ID remains displayed in the view.
To clarify: This is not the ID field of the Item content type, but the Doc-ID that is created by the doc-ID feature in SharePoint 2010.
Any ideas to why this value is not set when promoting values from Word?
It seems that the solution lied in the base Document content type in the site collection. When the document-id feature is activated, event handlers are added to the content type definition as xmldocuments. When a regular document library is created, the content type in the library inherits from this content type, and thus gets a copy of the event receivers. My custom document library with custom content types did not inherit from the site collection document content type, but rather from the base document content type (
0x0101
), and did not get a copy of the event receivers. Copying the xmldocuments into my base content type seems to do the trick.