- Ari Bakker’s Provisioning SharePoint 2010 Managed Metadata fields
- Wictor Wilen’s How to provision SharePoint 2010 Managed Metadata columns
Yes, I agree it is a tedious job and there are lot of things to keep in mind when provisioning managed metadata fields in SharePoint 2010. So, I decided to visualise what is involved.
I strongly recommend to read Ari Bakker’s blog post before proceeding any further as I reference his methods in the visualisations.
Hope these visualisations help in making the provisioning job much easier.
Do leave your comment if you have any suggestion.
As a best practice, every thing is wrapped into features:
1) Create your managed metadata columns Feature which deploys the custom managed metadata fields.
2) Create your custom content type Feature which deploys your custom content types that consume your custom managed metadata fields.
3) If you are creating custom list definition from your custom content type (that is consuming the managed metadata fields), then Create a custom list definition Feature.
4) Activate the features above in the same order.
Managed Metadata Columns Feature
- Deploys your MyMMS field
- This is the actual managed metadata field
- Deploys your MyMMS_0 field
- This is the actual field that stores the selected term id and term value
- the MyMMS field references this field
- This field is always hidden
- The feature activated code updates the MyMMS field properties like SSpId, TermSetId etc.,
- Refer to Ari Bakker’s blog post for the ConnectTaxonomyField method
- It is always good to have a feature dependency on the TaxonomyFieldAdded feature as this (hidden) feature is responsible for all the taxonomy magic in your site. If you are using web templates, make sure you read my blog post on Web Templates and Content Type Publishing which shows how to activate this feature from web templates.