I use CSOM and I want to copy a taxonomy field from one list item to another. Can someone give me an example of this?
gautam, thank you for the effort, I think I have found a bit more elegant way to do this.
case "TaxonomyFieldType":
{
var txValue = value as TaxonomyFieldValue;
var str = txValue.Label + "|" + txValue.TermGuid;
destination[key] = str;
break;
}
case "TaxonomyFieldTypeMulti":
{
var txValue = value as TaxonomyFieldValueCollection;
var values = txValue.Select(f => f);
var arr = values.Select(v => v.Label + "|" + v.TermGuid);
var str = String.Join(";", arr);
destination[key] = str;
break;
}
-
Can you share the complete code to Copy Taxonomy Field from one item to another – TARUN Mar 14 '17 at 10:22