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

OverTheWire[.com] Natas Walkthrough - JUST HINT, NO SPOILERS

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

Asp.Net Ending Response options, Response.End() vs CompleteRequest()