Start Updating the content type failed infopath

Updating the content type failed infopath

The Taxonomy Field Added feature is not activated on sites created using the blank site template, or sites created using custom site definitions so a good idea is to include a feature activation dependency that ensures this is activated before we attempt to provision our field.

The first part of this two part series discussed some of the problems with provisioning Share Point 2010 managed metadata fields.

This post will cover a robust method of deploying Share Point 2010 managed metadata columns in a way that avoids common errors and enables the columns to automatically show up in the search refinement panel.

I’ve based the code on Wictor’s excellent example with a couple of minor updates.

Instead of hardcoding the name of the term store I’m getting the default keyword store associated with the site (this means we do not have to hardcode the name of the managed metadata service but you should check this works in all your environments).

We can do this first step using the Visual Studio 2010 tools to create a list definition from the content type we created earlier.

As we added the Tax Catch All columns to our content type these will automatically be added to our list definition.

I find the easiest way to ensure all the columns are added to the list definition is to add them to a content type first.