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