How to update taxonomy field value for document set using SP2013 REST API?

Please find my implementation below:

 var testpayload = JSON.stringify({
              'formValues': [
                  {
                      '__metadata': { 'type': 'SP.ListItemFormUpdateValue' },
                      'FieldName': 'Title',
                      'FieldValue': folderName
                  },
                  {
                      '__metadata': { 'type': 'SP.Taxonomy.TaxonomyFieldValue' },
                      'Label': 'Some Label',
                      "TermGuid": "6859a10b-fdec-47e0-8632-757cc4b5e693",
                      "WssId": "-1"
                  }]
          }); $.ajax({
                  url: webUrl + "/_vti_bin/listdata.svc/" + listName,
                  type: "POST",
                  contentType: "application/json;odata=verbose",
                  data: testpayload,
                  headers: {
                      "Accept": "application/json;odata=verbose",
                      "Slug": listUrl + "/" + folderName + "|" + folderContentTypeId,
                      "X-RequestDigest": $("#_REQUESTDIGEST").val()
                  },
                  success: function (data) {
                     
                  },
                  error: error
              });

I am trying to update taxonomy field by creating testpayload but its not seems to be working.Is there any way to accomplish this?

Thanks in advance

April 22nd, 2015 9:26am

Hi,

Here are two blogs for your reference:

Using REST to update a Managed Metadata column in SharePoint!

http://www.aerieconsulting.com/blog/using-rest-to-update-a-managed-metadata-column-in-sharepoint

Taxonomy Columns & SharePoint 2013 List REST API

http://sharepointificate.blogspot.com/2014/05/taxonomy-columns-sharepoint-2013-list.html

Best Regards

Free Windows Admin Tool Kit Click here and download it now
April 23rd, 2015 3:08am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics