
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2020 03:21 AM
HI friends,
I want to trigger a workflow from inbound action. Can some one give me the lines of code plz.
i seen this link, but i am doubtful that how can we use workflow sys id as it changes every time we checkout and publish. So how to do this?
Also tell me how to get the sys id of a workflow.
Thanks in advance
Regards,
Indup
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2020 03:27 AM
Hi,
use below script; give your workflow name
var workflowRec = new Workflow();
workflowRec.startFlow(wflw.getWorkflowFromName('give the workflow name'), current, 'update');
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2020 03:27 AM
Hi,
use below script; give your workflow name
var workflowRec = new Workflow();
workflowRec.startFlow(wflw.getWorkflowFromName('give the workflow name'), current, 'update');
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2020 04:19 AM
HI Ankur,
in the second line you mentioned, where does that wflw come from?
please explain
Regards,
Indup
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2020 06:15 AM
Hi,
you can get the workflow name from this table 'wf_workflow'
Go to wf_workflow.LIST and search for your table and workflow name
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2021 05:41 AM
Could you help me with my question? if I am getting a user's initials from an inbound action like the following:
var userInitials = email.body.initials;
How can I pass that variable to a workflow I am triggering from am inbound action? Normally with a catalog item it would be current.variables...or it could be a workflow input...but not sure how to pass the inbound action email variable to a triggered workflow.
Please mark this response as correct and/or helpful if it assisted you with your question.
Steven