Hi Everyone, I am developing my first "backend" s...
# suitescript
m
Hi Everyone, I am developing my first "backend" suitelet and had a conceptual question. I am sending an https.post request in the afterSubmit entry point of a User Event Script. The https.post sends a handful of body parameters from a custom record and the suitelet creates an Estimate. My question is why does the user have to wait until the suitelet completes? Is there a way to make this more asynchronous or completely offload the processing from the user's perspective? Would a RESTlet work better or am I stuck with Task/Scheduled/MR script? Appreciate any guidance.
k
I believe you can send response to UE and process in back end rest of the process
b
user event to suitelet tends to fail at the authentication stage
unless you make the suitelet externally available, which should sound dangerous
k
MR works better compare to https request and response
m
ok thanks. Yes, I did have to set the suitelet to externally available, which does scare me a bit.
I started by just creating the estimate afterSubmit in the UE, but then my tax engine won't fire due to the chaining of UE scripts limitation
s
You can certainly trigger a scheduled/MR and the UE will not have to wait for that to finish. Depending on the traffic/other jobs running though, it might not actually happen immediately.
👍 1
c
I have a few instances where I send a task to a scheduled script. Won't clog up the main thread, and has a high governance, but as Sandii said, i usually notice a minute or two delay before the schedule script initiates.
m
very good to know. Thanks all.