Skip to content

Commit 761f539

Browse files
Create Bulk Resolve script.js
Added background script
1 parent 7661a0a commit 761f539

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

  • Server-Side Components/Background Scripts/Bulk Resolve Old Incidents
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
var incGr = new GlideRecord('incident');
2+
incGr.addActiveQuery();
3+
incGr.addEncodedQuery("sys_created_onRELATIVELT@year@ago@1"); //Created 1 year ago. Update query as required.
4+
incGr.query();
5+
while(incGr.next())
6+
{
7+
incGr.state = 6;
8+
incGr.close_code = 'No resolution provided';
9+
incGr.close_notes = 'Bulk Closing Old Incidents';
10+
incGr.update();
11+
}

0 commit comments

Comments
 (0)