1

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?

0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.