Skip to Content
avatar image
Former Member

Undoing things in DI

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Oct 11, 2007 at 08:09 AM

    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

    Add comment
    10|10000 characters needed characters exceeded