Can you use function initiateWorkflow() within a w...
# suitescript
r
Can you use function initiateWorkflow() within a workflow action script?
s
I do not believe workflows can call other workflows, similar to user events cannot call other user events.
r
Hey @Sandii thanks for your reply. I will try a different approach
Hey @Sandii is there any support article to state this isn't possible?
s
I think I was wrong, based upon this page Initiate Workflow Action
r
Hey @Sandii yeah this is for initiating on the same or child record type. I'm hoping to have a custom workflow action script be able to trigger a workflow on a completely different record type. Such as if a sales order is created, make an update/edit on an event or something like that.
s
Why not just use workflow action script to do the work on the other record, instead of triggering a second workflow. I think this is your only option, or have a scheduled workflow on the second record looking for a condition on the first (not live update the second record type)
r
I want it to be flexible by triggering another workflow instead of coding specifics inside of the script. The second workflow will be user accessible for other people to customize. I hope that makes sense.
s
Maybe you just make those customizable parts parameters on the first one, and just read from them in the script?