Close a canceled Change Request.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2025 01:38 PM
Accidently canceled a change request and I need to change the state to closed. It was actually implemented just no on the planed start date so it needed to be force closed. Is there a way to do this?
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-15-2025 01:52 PM
Hi @DevtoSME
Did you try to update state and close code of change request from background script?
Sample script as below:
var changeNumber = 'Enter your change number';
// Query the change request
var gr = new GlideRecord('change_request');
gr.addQuery('number', changeNumber);
gr.query();
if (gr.next()) {
gr.state = 3; //update the choice value of closed state here.
gr.close_code = 'successful'; // Set close code to 'Successful'
gr.update();
}