5

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?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Anoop
  • 5,246
  • 6
  • 27
  • 29
  • 3
    Duplicate of http://stackoverflow.com/questions/563465/sharepoint-2007-how-can-i-perform-a-series-of-operations-within-a-transaction . @Pavel: Thanks for correcting me. Didn't think it was possible but didn't check the dates on those links. – Alex Angas Jul 29 '09 at 09:04

2 Answers2

1

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.

Farhan
  • 887
  • 6
  • 13
0

That is not possible in SharePoint. When item is deleted than its deleted. There no way to handle it like SQL transactions.

STORM
  • 4,005
  • 11
  • 49
  • 98