When we use submit record in the scheduled script ...
# suitescript
t
When we use submit record in the scheduled script then user event executes... how the processing works? does it puts userevent in background processing and execute next lines of scheduled script or it wait for user events to complete then process the next lines of scheduled script?
a
I think it is depend on what type of function is used for user event
means Is it beforeload , beforesubmit or aftersubmit
e.g nlapiLoadRecord/record.load will trigger the before load and nlapiSubmitRecord/record.save will load the before submit and after submit
p
execution of user events in scheduled scripts is synchronous
e
^ this. User Events are synchronous. The only exception is
afterSubmit
invoked from a Web Store; there is a configuration that allows those to run asynchronously
p
To further add on Webstore Contextx asyncronicity on After Submits: • for that you check some checkboxes on "Enable Features" • It's only for sales orders submitted via commerce API and customers registered through commerce api • And (my personal) tests seem to indicate only Sales order setting is effectively async, and customer isn't really.
m
I wish there was an option on all deployments to run asynchronously, instead of messing around with triggering background scripts for longer running post processing tasks
p
I wish for an async after submit event separate from the other synchronous 2.
m
I don't really mind which way. I suppose NetSuite's happy with the status quo because having a barrier to run background tasks means less of them so less load on their servers