If I have two UE scripts and both have an afterSub...
# suitescript
i
If I have two UE scripts and both have an afterSubmit(), do they follow the order that the have declared in the scripted record page? Because Im having some issues with one script that fails because it uses a field that gets set by other one, the first one sets a field on the item sublist in the PO that the second script uses, but the second one fails because that field value is null. How can I fix this?
b
afterSubmit scripts require you to load and save the current record
think very carefully about performance if you are still making changes to the record in the afterSubmit
i
It’s better to merge them
i
Thanks! @battk and @Ichimoku I did that, I changed the script to load the record, in my case cant merge the files, but Im not making any changes to the PO so Im good for now with loading the record!, but good to know I was using the context.newRecord but now I know! thanks!