- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2020 08:53 AM
How can I call a workflow inside a workflow?
E.g. I have a form and a field called Workflow which is a reference field to the wf_workflow table.
I have the main workflow and inside that one more workflow should be called by fetching the data from the field which I created.
I know how to fetch the workflow id from the reference field I created inside the main workflow but unable to find how can I trigger a workflow with workflow id?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2020 09:00 AM
use below code to trigger workflow from run script activity in your parent workflow.
var wflw = new Workflow();
wflw.startFlow(wflw.getWorkflowFromName('give the workflow sys_id_from your reference variable'), current, 'update');
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2020 08:55 AM
Here is the article that will help you:
Please mark my response as correct and helpful if it helped solved your question.
-Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2020 08:57 AM
not useful. I already read that but it's not explaining how can I invoke it from workflow id dynamically.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2020 09:00 AM
use below code to trigger workflow from run script activity in your parent workflow.
var wflw = new Workflow();
wflw.startFlow(wflw.getWorkflowFromName('give the workflow sys_id_from your reference variable'), current, 'update');
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2020 09:10 AM
Below code worked with some modification from your code. Passed name instead of sys_id.
But I want to pass sys_id
var wflw = new Workflow();
wflw.startFlow(wflw.getWorkflowFromName('Workflow Name not sys id'), current, 'update');