when saving 2 records, if 1 fails, does Netsuite p...
# suitescript
s
when saving 2 records, if 1 fails, does Netsuite provide a way to rollback changes?
b
in general no
if your records are custom records, then you have the option of using parent/child relationships as described in the _SAFE guide_
s
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
Man. Wish they'd add scoped transactions somehow.
c
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