- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2017 12:12 AM
Hi All
I created a workflow named "CheckDocumentCompletedForSurgery".
now i want to trigger/start this workflow from business.
(function executeRule(current, previous /*null when async*/) {
// Add your code here.
})(current, previous);
what should i write in executeRule function so that my workflow get triggered.
Please help me. I am new to ServiceNow.
Thanks in Advance.
Best regards,
Pratap Ranawat
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-23-2017 12:14 AM
Hi Pratap,
(function executeRule(current, previous /*null when async*/) {
// This business Rule will trigger Breakfix Return Workflow when State changes from In Use to In Maintenance
var wflw = new Workflow();
wflw.startFlow(wflw.getWorkflowFromName('give the workflow name'), current, 'update');
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2018 09:11 AM
I was searching for an answer to something slightly related and found the answer at:
https://community.servicenow.com/community?id=community_question&sys_id=57258b6ddbd8dbc01dcaf3231f96190f
Chuck's answer is to make sure you are calling the global scope of workflow. Try changing the "new Workflow()" to new global.Workflow()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-21-2018 11:53 PM
Hi Sneha ,
Can you pls explain about the arguments current,'update' use in the below line
wflw.startFlow(wflw.getWorkflowFromName('give the workflow name'), current, 'update');
Thank you in advance,
Sweety
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2018 03:44 PM
Not working for me