Rollback and $undowork

Das Goravani goravanis at gmail.com
Wed Jul 13 18:41:39 UTC 2022


I am using transactions in the way you described Doug. I use them when there is a bunch of things to insert and update all in one Save.

So like saving an invoice, I have to:

-save the invoice record with an insert and returning for the PK field
-save the line items of the invoice as new records putting in the PK from the invoice record
-save a new payment record if they added a payment
-update the customers balance
-if payment is greater than this invoice, apply extra to other open invoices

If the connection goes down in-between any of these insertions/updates then I rollback.

Because I have all the data in memory, and any smart lists are created during the save process, so I can simply:

-re-log on to get a good connection
-allow the user to simply click the Save button again

Or at least, this is what I’m programming, and thinking, at this time. 

Das

Ps: I now realize, from what you said Doug, that I cannot undowork and have my smart list back ready to be used over again. No, I have to rebuild it fresh as a smartlist




More information about the omnisdev-en mailing list