- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2015 08:08 AM
Hi All,
We want to implement 'withdraw' facility in change ticket.
Now what is 'withdraw' facility? if the end user has submitted the change for approval, and at some point he decided he don't want to do this change now, then he will 'withdraw' the change which will reset all the approvals and change the state back to OPEN and approval to 'Not yet requested'. And in future user should again submit the same change ticket when he is ready.
Any idea how to implement this requirement?
Regards,
Varun
Solved! Go to Solution.
- Labels:
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2015 08:28 AM
Varun,
You can make use of restart Workflow option for this. check this http://wiki.servicenow.com/index.php?title=Workflow_Script#restartWorkflow.28current.2C_maintainStat...
So, you can have a script in UI action/Business rule and have the following script:
var comment = 'This changes is withdrawn';
new WorkflowApprovalUtils().cancelAll(current, comment);
new Workflow().restartWorkflow(current);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2015 08:28 AM
Varun,
You can make use of restart Workflow option for this. check this http://wiki.servicenow.com/index.php?title=Workflow_Script#restartWorkflow.28current.2C_maintainStat...
So, you can have a script in UI action/Business rule and have the following script:
var comment = 'This changes is withdrawn';
new WorkflowApprovalUtils().cancelAll(current, comment);
new Workflow().restartWorkflow(current);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-03-2015 11:51 AM
In addition to what Mani Kanta Korada has said, you would need to add a new state value as "Withdrawn". Put the change in this new state on click of UI Actiton, and put an if condition before approvals in your workflow, that would allow the workflow to go to approvals again only if the state is not "Withdrawn".