Itemupdating example

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”).

section to the field and hardcode the various Id’s that define a term set (required if you are using a sandboxed solution), or configure these in code.

This is something I haven’t seen covered anywhere else so in this article I’ll have a detailed look at how the managed metadata field functionality works so that we can correct these problems when creating list definitions that use managed metadata fields.

When we add a managed metadata column through the UI Share Point creates two fields: Additionally two event receivers are added to the list if they are not there already.

If this is working correctly you should be able to click on the crawled property to see the items that contain your managed metadata field as shown below.

This allows us to perform search queries on managed metadata field values, and also allows the refinement panel to display the metadata columns and values.

I’ve been working with the managed metadata functionality provided in Share Point 2010 fairly extensively over the past few months.

itemupdating example-27itemupdating example-42itemupdating example-5

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).

The second problem was due to the missing Tax Catch All and Tax Catch All Label columns and missing event receivers on the list definition.

The last issue can be easily avoided by adding a feature dependency to ensure the required feature is activated before we deploy our custom site column.

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.

To recap on the previous post we are aiming to avoid the following problems when creating Share Point 2010 taxonomy fields through features: We found the first problem was due to a missing note field when creating a list definition that used the site column.

Leave a Reply