change the stage of a RITM manually
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2018 07:40 AM
Hi there, I have an RITM whose stage is stuck at Fulfillment due an incorrect workflow, which has been now corrected, however I have difficulty in changing the stage of the RITM from Fulfillment to Request Cancelled. Used below script but it's changing the state only in Form View. When looked at the List view, the record's stage still shows as Fulfillment.
Copied stage value from Workflow.
var gr = new GlideRecord('sc_req_item');
gr.addQuery('number','RITM0123456');
gr.query();
if(gr.next()){
gr.autoSysFields(false);
gr.setWorkflow(false);
gr.stage = 'Request Cancelled';
gr.update();
}
List View:
Form View:
Any help in this regard is really helpful. Thanks,
- Labels:
-
Request Management
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2018 07:45 AM
Hi,
Please follow instructions from documentation: https://docs.servicenow.com/bundle/jakarta-servicenow-platform/page/administer/workflow-administrati...
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2018 07:53 AM
Thank you Allen for the suggestion. Please note that the Workflow has been already completed, the initial workflow was missing the Complete Stage, which has been later corrected. Now, All I want do is to force update the RITM stage so that it wont appear in the active RITM's report. Thanks again.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2018 08:32 AM
When you follow the instructions from the documentation, does the RITM show there as "Executing". You're saying that it's complete (cancelled? but complete none the less)...but the stage isn't accurately reflecting what you manually changed it to (via script). Just the form shows request cancelled, but not the workflow stage.
So with that, I would imagine that it's still open and executing. If you go to Active Contexts and search for it, you should see it there. You can change it there to request cancelled and see if that works or click the Nudge button, which will try to bump a hung workflow to finish.
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-13-2018 09:59 AM
Thank you Allen, There are no active workflow contexts for this RITM.