The CreatorCon Call for Content is officially open! Get started here.

Bulk close open Change Requests

Chris17
Tera Contributor

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!

1 ACCEPTED SOLUTION

Jaspal Singh
Mega Patron
Mega Patron

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();
}

View solution in original post

7 REPLIES 7

ersureshbe
Giga Sage
Giga Sage
Hi, Yes you can close using script or goto change request list view and manually change it to closed in a single time. Please mark as correct answer if it helped. Regards, Suresh.
Regards,
Suresh.

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

Its just 70. Just do it from the list.

Update All feature will be handy.

find_real_file.png

 

Add the fields you want to update and done.

-Anurag

-Anurag

Security prevents list updates