- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2021 05:03 PM
Hello SN Community,
I hope someone will help me with this.
I am new to SN but really learning.
I need step by step instruction as to how move back a change request state from Review State to Asses state. Becuase the change failed. Is it possible??? If so please provide step by step as I am new to SN environmnet.
Thank you SN community.
Appreciate your help.
Solved! Go to Solution.
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2021 03:31 AM
okay got it. If it is just for one change request, then you do not need to follow the above steps as my thought was you need to setup a functionality for future change request as well.
For one change Request, you need to run a Background script and that should work for you.
Navigate to Background Script module as shown below:
Copy paste the below script and replace in line number 2 the correct sys id of the change request record for which you want to do this change.
var gr = new GlideRecord('change_request');
gr.get('e8f816d5c0a801640131b8101100744c'); //Replace sysID with your ChangeRequest SysID
gr.state = -4;
gr.setWorkflow(false);
gr.update();
Please try this in your Non Prod instances first before executing it in Production, just to be on a safer side.
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2021 08:26 PM
Hi,
I don't think it is possible unless you customise. you can find more details about state model transitions on the link below
https://docs.servicenow.com/bundle/rome-it-service-management/page/product/change-management/concept/c_ChangeStateModel.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2021 12:20 AM
Hi,
There is no OOB way to do this. In order to achieve this, you need to follow the below steps:
1) Navigate to UI Actions module under System Definition Application menu and then click on New button as shown below:
2) Create a new UI action to allow users with an ability to move the change back to Assess state as shown below:
Note: You can add conditions in your UI Actions as well in case you want only certain users to have an ability to move the change back to Assess state.
3) Once done, on click of this UI Action, the change will revert to Assess state.
4) You can also write a line in your UI Action to retrigger the Flow or workflow which ever you might be using in your Change module as mentioned below.
Workflow:
new global.Workflow().restartWorkflow(current, true);
https://community.servicenow.com/community?id=community_question&sys_id=c18ff2e9db58dbc01dcaf3231f9619c2
Flow Designer:
Flow designer cannot be restarted. Only way can be to cancel the current Flow Context and then reattach the Flow again. Please follow the steps as mentioned in below thread:
https://community.servicenow.com/community?id=community_question&sys_id=e7013d5adb7ae0903daa1ea6689619de
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2021 02:52 AM
Hi shloke04
will the above action affects all changes in the system or just one change request.
because my query is just for one single change request.
Thanks heaps
Elias
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2021 03:31 AM
okay got it. If it is just for one change request, then you do not need to follow the above steps as my thought was you need to setup a functionality for future change request as well.
For one change Request, you need to run a Background script and that should work for you.
Navigate to Background Script module as shown below:
Copy paste the below script and replace in line number 2 the correct sys id of the change request record for which you want to do this change.
var gr = new GlideRecord('change_request');
gr.get('e8f816d5c0a801640131b8101100744c'); //Replace sysID with your ChangeRequest SysID
gr.state = -4;
gr.setWorkflow(false);
gr.update();
Please try this in your Non Prod instances first before executing it in Production, just to be on a safer side.
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke