Updating Taxonomy Field in Remote Event Receiver

%3CLINGO-SUB%20id%3D%22lingo-sub-275683%22%20slang%3D%22en-US%22%3EUpdating%20Taxonomy%20Field%20in%20Remote%20Event%20Receiver%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-275683%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20trying%20to%20update%20a%20Taxonomy%20Field%20in%20a%20Remote%20Event%20Receiver.%3C%2FP%3E%3CP%3ELike%20they%20discribe%20in%20the%20following%20post%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FSharePoint%2FPnP%2Fblob%2Fmaster%2FSamples%2FECM.AutoTagging%2FREADME.md%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FSharePoint%2FPnP%2Fblob%2Fmaster%2FSamples%2FECM.AutoTagging%2FREADME.md%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EThis%20doesn't%20work%3A%20%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3Eresult.ChangedItemProperties.Add(%22TaxonomyField%22%2C%20%222%3B%23MYTERNNAME%7C74972ac9-3183-4775-b232-cd6de3569c65%22)%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EUpdating%20a%20single%20line%20of%20text%20field%20works%20fine%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%3CSPAN%3Eresult.ChangedItemProperties.Add(%22TextField%22%2C%20%22SomeText%22)%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20help%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKind%20Regards%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EVandeput%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1728565%22%20slang%3D%22en-US%22%3ERe%3A%20Updating%20Taxonomy%20Field%20in%20Remote%20Event%20Receiver%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1728565%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F4189%22%20target%3D%22_blank%22%3E%40Christophe%20Vandeput%3C%2FA%3E%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3EI've%20found%20the%20following%20works%20in%20SPO.%3CBR%20%2F%3E%3CBR%20%2F%3Eresult.ChangedItemProperties.Add(%22TaxonomyField%22%2C%20%224%3B%23My%20Term%20Value%22)%3B%3CBR%20%2F%3Eresult.ChangedItemProperties.Add(%22TaxonomyHiddenField%22%2C%20%22My%20Term%20Value%7C%3CGUID%3E%22)%3B%3C%2FGUID%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi, 

I'm trying to update a Taxonomy Field in a Remote Event Receiver.

Like they discribe in the following post: https://github.com/SharePoint/PnP/blob/master/Samples/ECM.AutoTagging/README.md

 

This doesn't work:

result.ChangedItemProperties.Add("TaxonomyField", "2;#MYTERNNAME|74972ac9-3183-4775-b232-cd6de3569c65");

 

Updating a single line of text field works fine:

result.ChangedItemProperties.Add("TextField", "SomeText");

 

Any help?

 

Kind Regards

 

Vandeput

1 Reply

@Christophe Vandeput 

I've found the following works in SPO.

result.ChangedItemProperties.Add("TaxonomyField", "4;#My Term Value");
result.ChangedItemProperties.Add("TaxonomyHiddenField", "My Term Value|<GUID>");