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.

fired event itemupdating-15

I’ve also created an example project that I’ve included at the end of the article if you want to see this working for yourself.

Create a managed metadata field The first step is to create a site column using the Field element with a Type of either Taxonomy Field Type (allowing a single selection) or Type Taxonomy Field Type Multi (allowing multiple selections if you also set Mult=”True”).

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.

If we inspect a list that contains a managed metadata field created through the UI it shows two event receivers.

These are the Taxonomy Item Synchronous Added Event Receiver for the Item Adding event and the Taxonomy Item Updating Event Receiver for the Item Updating event.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.At this point we have a robust way of deploying a standalone site column which is useful in certain situations but in many situations we need to provision content types, list definitions and list instances which is when things get tricky…As explained in the previous post Issues provisioning Share Point 2010 Managed Metadata fields – to ensure the metadata field automatically appears in the search refinement panel as it does for all other managed metadata fields we need to add the Tax Catch All columns to our list definition and wire up two taxonomy event receivers.When we add either the site column or content type to a list the managed metadata field works and shows up in the search refinement panel (at least it did in my testing).