Update ListItem in Modern Pages with Taxonomy Field Value via REST API not working

Copper Contributor

Hi all,

 

 I am trying to update a list item with taxonomy field value in modern pages from my spfx webpart. I am getting 204 as response and no error but in the background it is not really saving the taxonomy field value but a new version of the item is getting created. Can anyone please help me. I use SPHTTPClient.fetch and the following headers:


this._spHttpClient.fetch(itemUpdatedUrl,
SPHttpClient.configurations.v1,
{
body: JSON.stringify(body),
method: "PATCH",
headers: {
'X-HTTP-Method': 'PATCH',
'IF-MATCH': '*'
}
}
)

 

Here is the body for my request

{"articleDate":"2017-10-27T22:00:00.000Z","scope":{"TermGuid":"e9955332-61bf-42dc-8667-3d560bd8e220","WssId":-1,"Label":"Finance"}}

 

Response: 

HTTP/1.1 204 No Content
Cache-Control: private, max-age=0
Expires: Tue, 26 Sep 2017 12:35:19 GMT
Last-Modified: Wed, 11 Oct 2017 12:35:19 GMT
ETag: "363"
.............................
X-SharePointHealthScore: 0
X-SP-SERVERSTATE: ReadOnly=0
ODATA-VERSION: 4.0
SPClientServiceRequestDuration: 776
SPRequestDuration: 825
X-AspNet-Version: 4.0.30319
SPRequestGuid: b7d9219e-7069-4000-7720-349ae4f21451
request-id: b7d9219e-7069-4000-7720-349ae4f21451
MS-CV: niHZt2lwAEB3IDSa5PIUUQ.0
X-RequestDigest: 0xD0447254BF6CC1554306AFD380E061C10B3142F1251E6ECF604611B78D01E50B9A963965989547F17B6E1992D7A5EE0FBDE311CA841FD6830F19732FF1E650AE,11 Oct 2017 12:35:20 -0000
Strict-Transport-Security: max-age=31536000
X-FRAME-OPTIONS: SAMEORIGIN
X-Powered-By: ASP.NET
MicrosoftSharePointTeamServices: 16.0.0.6927
X-Content-Type-Options: nosniff
X-MS-InvokeApp: 1; RequireReadOnly
X-MSEdge-Ref: Ref A: D6975731627C4FC7B51D35A21E797690 Ref B: AMS04EDGE0215 Ref C: 2017-10-11T12:35:20Z
Date: Wed, 11 Oct 2017 12:35:20 GMT

 

 I also tried with correct eTag but still having the same problem.

Any suggestions would be appreciated.

 

0 Replies