QQ can a Workflow trigger a UE? I'm thinking not b...
# suitescript
n
QQ can a Workflow trigger a UE? I'm thinking not but not 100% sure
m
Don't think so either, you can create an action to invoke suitescript though
e
No, User Events (whether scripts or workflows) do not trigger other User Events
I suppose more accurately, a User Event Workflow (one triggered on Before Record Load, Before Record Submit, or After Record Submit) will not trigger any other User Event.
p
I have a button created by a workflow that updates a field on click and I have a UE script running and checking the field and works fine.
e
That's because that's a Client Workflow
button clicks are not any of Before Record Load, Before Record Submit, or After Record Submit
n
Thank you @erictgrubaugh @Mozsuite @Patrick A. for your replies. I didn't see them until today. I have been testing a SuiteLet that produces searches result lists based on different user selected filters and thought my code was "broken". In reality it a Scheduled Workflow is updating records and so the results seemed inconsistent! There's a chunk of logic in a UE that goes hand in hand with this to set certain values ready for print output but the WF is changing something that then makes my UE also look like it's not working properly 😞 I think I have two options, a) create a WFA that mimics my UE and incorporate that in the WF or b) adopt the WF logic in to my UE. Either way I was not advised of this WF and accommodating it is out of scope. Thanks again.
e
You can extract the logic from the UE that will be used in both into its own module, then both the UE and the WFA can simply call the same module
that way you don't have duplication of code