when saving 2 records, if 1 fails, does Netsuite provide a way to rollback changes?
b
battk
11/15/2021, 10:56 PM
in general no
battk
11/15/2021, 10:58 PM
if your records are custom records, then you have the option of using parent/child relationships as described in the _SAFE guide_
s
stalbert
11/15/2021, 11:02 PM
a common practice here is to try and make your logic perform upserts cleanly, so that one might retry and get both records to save correctly. Alternately, application-level rollback can be baked into your logic.
s
screnshaw
11/15/2021, 11:03 PM
Man. Wish they'd add scoped transactions somehow.
c
CD
11/16/2021, 6:23 AM
Probably too difficult, given user event scripts etc. there's probably already too much other stuff going on to just straight allow raw DB transactions