Hi all, is there any technique that a scheduled sc...
# suitescript
n
Hi all, is there any technique that a scheduled script can be queued, not run in a parallel manner when being called by a user event? Thanks
h
Hi @nzy, I was able to do this by creating a multiple deployment with a running number in its script name (i.e.
deployment1, deployment2,...
) and a loop. So when I call a schedule script deployment, if its already been
queued
or `in-progress' I'll just skip to the next deployment.
m
I do something similar by having the UE trigger a workflow asynchronously which runs a workflow action script.
n
thanks for replying. I'm loading and writing a custom record on AfterSubmit so potentially parallel loading/saving may cause record changed error. So ideally it processes the custom record in a single thread.
@michoel does the workflow action script queue the requests?
m
I believe so
n
thanks Michoel. sorry for replying you late as I'm on annual leave this week. Will try when I'm back. (this will be my first workflow action script!
m
No worries, enjoy your break 🙂