Created a user event script, on afterSubmit, it ta...
# suitescript
p
Created a user event script, on afterSubmit, it takes all the lines from the transaction and creates a new work order for each line, it saves the record ID of the initial record on each work order as reference. I then also want to record the work order ID's back on each line of the original transaction. Am I going to have to re load the record in the afterSubmit and update/save it? or are there any tricks to bypass that
m
Because you’re in AfterSubmit, you’ll need to load the original record, update it, and save it.
p
shame! but thanks.
b
Creating transactions in a loop usually creates performance problems
You probably want to do this in a scheduled or map reduce script instead
p
It will be fairly infrequent occurrences of sub 10 lines, week 1 of updating to 2.0. not quite ready for map reduce quite yet!