Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

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.

share|improve this answer
    
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 Feb 21 '12 at 11:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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