I've used this guide to create my batch and update the items.
Information: There are 3 tr
's inside the body
. In my test, they give these results:
Pnp-js is a really cool library built on top of the SharePoint rest api. It simplifies writing JavaScript to query the SharePoint REST Api and allows us to focus on getting the data we need without having to manage all the ajax requests ourselves.
id = 1; newOrder = 2
id = 2; newOrder = 1
id = 3; newOrder = 3
When I run the code, this is the following result:
console.log(test)
never runsconsole.log(r)
logs undefinedconsole.log(e)
never runs
If I log batch
just before it's executed, I'm able to see 3 items inside. So I know the items are added to the batch
.
But the items are never updated, and all I get is.
Error: Error making HttpClient request in queryable: [400] Bad Request
Image of the batch log:
Can anyone tell me what I'm doing wrong?