Hi, I have created a script that adds a new column (of type managed metadata) to a list of libraries and then hooks it up to the correct term set. All seems fine and I can select a term from the list but when I save the dialogue form I get the error: The SPListItem being updated was not retrieved with all taxonomy fields
If I delete the column and add it manually then everything works as expected. Any ideas?
Thanks, all fixed now. Seems the code was creating list columns (not a site column) and this wasn’t wiring up nicely with the MM column. Only reason I can think that the site column was not getting created was that the specified custom group did not exist. If I manually created the group, the site column was created and the MM column was added successfully to the libraries. I have since ditched the custom group line of the code as the column is created in “custom columns” by default if a group is not specified. This works for me.
If you’re creating the taxonomy field through API instead of using schema.xml, did you create a hidden note field and set its ID to the TextField property?
https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.taxonomy.taxonomyfield_properties(v=office.14).aspx