I have a custom record “ABC” which has some child ...
# suitescript
j
I have a custom record “ABC” which has some child records “DEF”. The ABC is being created, along with its DEFs, in a Suitelet. Is there a way in server-side SuiteScript to add the child records to the ABC all at the initial save (e.g. add them to the sublist prior to saving the ABC and just do one save)? Currently, I’m saving the ABC then one-by-one creating and saving the DEFs but I need to trigger a WF on create of the ABC that relies on the data from the DEFs.
though you wont get workflows or user event triggered on that
j
wf runs on parent created
that link has very little info on scripting
seems to all be UI except for an example of getting a sublist value
b
SuiteApp Architectural Fundamentals & Examples 2.3.4 Using Parent-Child Relationships to Perform Mass Create/Update
basically setup the parent/child relationship so that its an editable sublist
which allows you to create the child records from the parent record by adding rows to the sublist