I have done a Custom DocID provider and I want to be able to specify a different format for the DocID for each Content Type.

I have managed to add a custom action (using 30+ SharePoint Custom Actions Location and Sample) on the Content Type Settings page which links to a page where the user can type in the preferred format for the content type.

I am not sure now how to save the information captured against the content type?

1 Answer 1


SPListItem is passed as a parameter of GenerateDocumentId method.

SPListItem.ContentType in turn contains the Content Type of the item you're about to generate DocID for.

If you would store some indication of the desired format in a specific field of a Content Type, BUT never show the field for end users (Hidden). You may need to set default value for the field for it to have a value as it is hidden.

  • Thanks for the suggestion. How I am actually trying to implement it is by adding the preferred format to the XmlDocuments for the content type eg: ctype.XmlDocuments.Add(docIdFormat) and then also be able to read this value when the documentId is being assigned.
    – threela
    Commented Feb 21, 2012 at 11:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.