if we have a script and a WF setting the same fiel...
# suitescript
m
if we have a script and a WF setting the same field - which will run first? script or WF?
s
Bad idea, pretty sure there is no official answer on this.
b
UserEvent script runs before WorkFlow if they are in the same entry point https://ceanatech.com/2019/03/04/which-executes-first-user-event-scripts-or-suiteflow/
m
Unfortunately, it seems a bundle is setting a field, which was being (un) set by our WF, or at least that's what I think is happening. The WF condition is running and should uncheck a checkbox, but that checkbox is getting checked by the bundle's scheduled script and the script is locked. Any suggestions to overcome this issue?
s
wihtout knowing what checkbox it is, try to make your own checkbox that the bundle isnt touching and build logic on that instead?
m
It's the 'To Be Emailed' field on the communication tabs on transactions. We don't want to send out emails on Orders.
b
Does the bundle script run on
beforeSubmit
or
afterSubmit
? If it runs on
beforeSubmit
, you could run your workflow on
afterSubmit