Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

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

$
0
0

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


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>