cancel
Showing results for 
Search instead for 
Did you mean: 

Undoing things in DI

Former Member
0 Kudos

Hey

I'd like to be able to "undo" DI operations.

Like the SQL Transaction which allows an entire set of command to be committed together or not done at all, I would like to be able to do that with the DI. Is that possible?

The problem I'm facing is adding many SpecialPrices records. I want that either all the records are entered correctly, or none is entered. Currently, it is possible that some record would have an error and the records before that would be added correctly, but that means that not all the records were added, and keeping track of want was successful and then remove it seems an overhead.

Accepted Solutions (1)

Accepted Solutions (1)

AdKerremans
Active Contributor
0 Kudos

Hi Avi,

The Company object has a StartTransaction and EndTransaction method to accomplish what you want

do a StartTransaction at the beginning

if all is correct do an EndTransaction(Commit)

else do an EndTransaction(Rollback).

I suggest to look in the SDK Helpcenter for a sample,.

Regards

Ad

Former Member
0 Kudos

Thanks

Answers (0)