Updating site content type failed infopath sharepoint
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”).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.I’m taking the code approach here as it is the only way to ensure the field will work across multiple environments.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).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.
With this information we can use the following steps to deploy managed metadata fields that avoid these issues.
So to create this note field we can add a field similar to the following: Note: Share Point uses the suffix _0 appended to the display name of the field and Tax HTField0 after the static name so I’m following those conventions.
To link the two together we can update the field we created in step one to include a customization section that points to the note field as shown below: Note the value within the Text Field property is the ID of the note field we created above.
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).
This is due to the fact that Share Point automatically wires some extra bits (shown below) when the field is added.