- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2022 09:17 AM
Hello,
I currently have a requirement to close over 70 open Change Request records. They are in a variety of states, and I was hoping there was a way I could run a script to automatically set them all to Closed. Is this possible?
Thanks!
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2022 09:23 AM
Something as below should help.
var getchange=new GlideRecord('change_request');
getchange.addEncodedQuery('numberIN'); //eg. numberINCHG0030076,CHG0030091
getchange.query();
while(getchange.next())
{
getchange.state='3';
getchange.work_notes='Closing in bulk';
getchagne.setWorkflow(false);
getchange.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2022 09:23 AM
Suresh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2022 09:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2022 09:43 AM
Security prevents list updates