We continue our series of useful tips and common development scenarios for SharePoint Managed Metadata with an article that shows how to declaratively provision a taxonomy field and how to connect it with an existing term set. It’s a follow up of Programmatically Import Term Set into Managed Metadata Term Store where we explained in details how to import a term set into the Managed Metadata term store.
The current sample uses the Company Enterprise Industry Taxonomy term set that we created in the previous post, so today we will not spend time explaining how to create a term set.
Define Taxonomy Fields in CAML
The creation of a field definition of the taxonomy type in SharePoint is a bit different than that of other field types. The main difference is that we actually need two fields – one field is assigned type TaxonomyFieldType and the other is of type Note.