Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create/delete multiple items in a transaction

I am trying to delete multiple items in a SharePoint list with the constraint that either all of the items should be deleted or none of the items should be deleted.

In short, I am looking to create more of a transactional behavior in SharePoint. I have tried using the ProcessBatchData() function but it doesn't seem to fulfil my requirement. Is there, perhaps, another method that someone knows of to accomplish this goal?

like image 565
Anoop Avatar asked Nov 14 '22 15:11

Anoop


1 Answers

For SharePoint object model, as mentioned in the comment would work. For SharePoint csom, you would call context's executequery method once after performing delete operations.

like image 65
Farhan Avatar answered Jan 18 '23 12:01

Farhan