Cancelling Change request in Bulk
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2020 10:43 AM
Dear All,
We need to cancel some old CR's in bulk. And we can not update the same from list view as security does not allow us to do so.
Could you please let us know if there is any alternative?
Thanks,
Shashank
Labels:
- Labels:
-
Change Management
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2020 04:12 PM
Hi Shashank,
You will need to run a fix script. I suggest building a query string based on your list view and save the query.
Right click the query to copy it.
Use the following fix script to move all the change requests to cancelled state.
var changeGR = new GlideRecord('change_request');
changeGR.addEncodedQuery('state=-2'); //add copied query into the ''
changeGR.query();
while(changeGR.next()){
changeGR.setValue( 'state' , '4');
//changeGR.setValue( 'work_notes' , 'Change canceled in bulk due to age') //example of adding work note to changes as part of being canceled.
changeGR.update();
}