Is it possible to delete a parent record and depen...
# suitescript
n
Is it possible to delete a parent record and dependents using record.delete?
j
You’d have to do the children first.
n
gotcha, so i need to do a search for child records by parent id and then delete each of those separately, then remove the parent?
1
is there a way to do that atomically?
s
I don't believe there is any sort of automatic cascade deletion.
n
I just don't want to leave the parent/children in an inconsistent state if one of them fails, is there a way to wrap that in a transaction of sorts
j
not that I’m aware of
n
bummer, thanks
I did get it working but it feels brittle if anything goes wrong with a single record
j
welcome to NetSuite
😅 1