Tuesday, August 21, 2012

Setting the "AllowedContentTypes" for a document set doesnt work

I really liked Cory's article on how to deploy documents sets using declartive XMl. However, when implementing it, I noticed two issues that prevented sharepoint from using the AllowedContentTypes declartion I used.

The first - the culprit was Inherits="TRUE" Version="0" in the content type declaration. If I removed those, sharepoint created the content type with the allowed content types properly defined.

The second one is that the content type that is referenced inside the AllowedContentTypes has to be created by a seperate feature. I had carefully made sure that all the document content types are declared before the document sets, but nothing worked until I seperated the document sets to a seperate feature, with a dependancy on the document content types' feature.

No comments: