How can we restore the state of a cancelled Change Request?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-25-2021 03:47 AM
Hi, experts,
- How can we restore the state (re-open) a cancelled Change Request?
- How can we restore the state of a Closed Change Request?
Thanks
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-25-2021 04:03 AM
Hi,
Are you looking for "Move to draft" kind of functionality where the cancelled/closed Change requests will be made active and the workflow starts from the beginning again?
if yes, then you may try below
1. Create a UI Action called "Move to Draft"
2. Script:
new Workflow().deleteWorkflow(current);
current.state = '-6';//choice value equivalent to draft in your environment
current.update();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-25-2021 04:07 AM
Hi
If its one time script that you are looking for, then go to fix scripts and create new and add this code
var gr = new GlideRecord("change_request");
gr.get("your_sys_id");
gr.state= '-6';
gr.update();
Mark the comment as correct/helpful once worked.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-26-2021 04:27 AM
If this has answered the question, kindly mark the comment as a correct answer so that the question is moved to the solved list.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-26-2021 10:13 PM
Thanks for marking the comment as helpful. Kindly also click on the button "Mark as correct answer" so that the question is moved to the solved list.