Rated 4.12/5 based on 673 customer reviews

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.

When you add or edit a document in the list or library the event receivers combine the values of all the taxonomy fields into the Tax Catch All Label column and the values of all the hidden note fields (i.e. To show how this works I’ve included an example of the values for a document that contains two managed metadata fields; a Regional Office field that contains the single value ‘New Zealand’, and a Brand field that contains the values ‘Coca-Cola’ and ‘Cadbury’.

Field Adding – This occurs when is field is being added to a content type.

Field Deleted – This occurs after a field is deleted from a list.

There are basically two types of event receivers: Synchronous and Asynchronous event receivers.While this approach works for deploying standalone site columns there are a few problems you might encounter: The first issue is to do with the fact that managed metadata columns rely on a second note field to function correctly.This is mentioned in a forum post referenced in the comments of Wictor’s article but even when you add this in you run into the second problem: the managed metadata column does not appear in the search refinement panel as per columns created through the UI.These aren’t hard to add in but it took me a lot of investigation to find out so hopefully this saves others some time.In the next post I’ll show how we can use this to provision the managed metadata fields in a way that allows them to participate in the automated process of appearing as search refinements.

Leave a Reply