How to update TaxonomyField sharepoint 2013

the most simple solution, and occasionally the only working one, is to find the Term itself and send it and let SP to handle everything else, and the code is much shorter

this is the code for updating the field

Term ItemTypeTerm = GetTermByName();

if (ItemTypeTerm != null)
{
    TaxonomyField ItemTypeField =       
      (TaxonomyField)f.Fields.GetFieldByInternalName("CbsMMDItemType");

    ItemTypeField.SetFieldValue(field, ItemTypeTerm);
}

Comments

Popular posts from this blog

c# Service Play Sound with NAudio example by Moshe

SOLVED The item could not be indexed successfully because the item failed in the indexing subsystem

JS/JQ simulate Enter event