Custom Software Apps & SharePoint Consulting

Packaging Document Set Content Types for SharePoint

I ran into some problems today when attempting to package and deploy a custom Document Set content type in SharePoint. This had negative side effects that carried over to other areas of my solution, and I’d like to save other users from running into this issue!

Quick explanation:

When you create a custom Document Set, there is an option to make the columns required to force the user filling out the form to complete the field. You can also make it optional to have the field show up in the forms but not required, or hidden to keep the fields out of the forms. Hidden is a nice way to include administrational fields that you don’t want users to modify, so I used workflows to modify these fields. This worked fine when I was creating the hidden fields, but failed during packaging and deployment.

Problem:

When I deployed my solution, I expected to find the hidden columns that I had created in my document library settings, but I could not. You might think, duh, the columns are hidden. But hidden columns are supposed to be available in the settings menu so that you can modify them.

I could see the columns in the content type definition settings, and I could run code against the document library to see that the columns existed. But I couldn’t do anything with the columns. I couldn’t remove them, I couldn’t modify them with workflows from SharePoint Designer. Nothing.

So, I was basically forced to delete my document library and start over. Bummer.  It was a mess and took a while to recover from.

Solution:

If you are ever creating a custom SharePoint Document set, I would suggest that you save all columns as optional in custom content type definitions and modify the setting (Required/Optional/Hidden) at the list level. This is probably the cleanest way to package and deploy custom content types and will most likely save you the headache of having to do clean-up.

For more on SharePoint consulting and solutions, visit our Knowledge Base!

Share this post with your friends

Share on facebook
Share on reddit
Share on twitter
Share on linkedin
Skip to content