1

Is there a way, possibly through the OfficePnP js-core library, to have a javascript model that represents a set of list items that knows when it's dirty and can commit that back to SharePoint in a batch operation?

In other words, I'd like to add, remove, and update javascript objects from a collection then just pass that off to something that will commit the proper actions to the SharePoint server via REST.

2

in other words, I'd like to add, remove, and update javascript objects from a collection then just pass that off to something that will commit the proper actions to the SharePoint server via REST.

SharePoint itself is that 'something'

When you add your own layer/tier (with REST or JSOM)
you will have to write that 'something' yourself

Libraries like PnP Core JS make the writing easier (including batching)
but it does not do the work for you.

In PnP they call that 'something' Business Objects:

for insipiration see: https://github.com/SharePoint/PnP-JS-Core/wiki/Extending-with-Custom-Business-Objects

|improve this answer|||||
0

I used to do batch operations using SharePoint REST API. The below article I was referring to

https://dev.office.com/sharepoint/docs/sp-add-ins/make-batch-requests-with-the-rest-apis

If you want to use PnP JS Core, I found the following article:

https://github.com/SharePoint/PnP-JS-Core/wiki/Batching

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.