SharePoint Content Type Cheat Sheet

Principle

Any application or solution built in SharePoint must use a custom content type over adding columns to lists. The only exception to this is one-off solutions that have no life-cycle, proof-of-concepts, etc.

Creating Content Types

  • Web UI. Not portable, POC only
  • C# or Declarative (XML). Must deploy these as Features

Rule

Do not chagne the base XML for a Content Type after deploying. The only exception to this rule is that you can re-deploy a modified Content Type definition only after completely removing it from the environment (either programatically or by hand).

Updating Content Types

  • Update and push down to child types
    • Web UI. Manual for each environment. Document steps required for repeatability.
    • Feature Upgrade. Preferred solution.
    • C#. If you created the content type through code you might want to go this route.
  •  Create new modified Content Types and hide the old one. Not recommended but useful for legacy.

References

Agree or disagree?

Published Tuesday, February 15, 2011 9:20 AM by Bil Simser

Comments

# re: SharePoint Content Type Cheat Sheet

Tuesday, February 15, 2011 11:59 AM by Wictor

Worth mentioning is that the preferred method of updating is to use Feature Upgrades. Saves you from creating just another feature.

# re: SharePoint Content Type Cheat Sheet

Tuesday, February 15, 2011 2:09 PM by Bil Simser

@Wictor Thanks, I've added that as the preferred method for upgrades. For some reason it was absent from my mind when I wrote this.

# re: SharePoint Content Type Cheat Sheet

Tuesday, February 15, 2011 3:04 PM by Bismarck

Bil, I have a Site Column deployed using a base xml file which unfortunatley was missing the "List="UserInfo" attribute.  As a result, the datasheet view crashes when the user attempts to populate this column.  I've tried updating the XML, redeploying and re-parenting but to no avail.  I think its now in the ContentDB.  Any suggestions on a remedy?

# re: SharePoint Content Type Cheat Sheet

Tuesday, February 15, 2011 8:12 PM by Michhes

We've periodically updated (added to) the custom content type XML we use on westernaustralia.com for years now with no major issues. Dirty but the additive change flows through automatically although our content type hierarchy is quite flat.

Leave a Comment

(required) 
(required) 
(optional)
(required)