How to set the Managed metadata field when using SharePoint Copy Web Service?

I am using the SharePoint Copy web service to upload a file to a document library. The library uses a content type that contains a managed metadata field. I cannot figure out how to update this field using the FieldInformation class. I had no problems setting up any of the other fields using this method. An example of how I upload a file with FileInformation can be found here.

I tried to set the field through its display name, as well as a hidden record field with the same name plus 0.

SharePointCopyWebService.FieldInformation fieldInfo = new SharePointCopyWebService.FieldInformation(); fieldInfo.DisplayName = "Internal Audit Topics_0"; fieldInfo.Type = SharePointCopyWebService.FieldType.Note; fieldInfo.Value = "Known Term"; fieldInfoArray.Add(fieldInfo); 

Additional Information:

  • This is done inside a Win Forms application.
  • I am not allowed to use SharePoint Server / Client object models

Any ideas on how to update a managed metadata field using the FieldInformation class?

+6
source share
1 answer

the managed metadata field has a format similar to the search field (that is, "id; #value"), except that it requires a long-term label guide, for example, "Identifier; #TermLabel | XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

This will work, but getting external applications to know the correct value of the guides pretty much destroys this function for updating from external systems.

0
source

Source: https://habr.com/ru/post/892362/


All Articles