Skip to content

Commit 2d21e0a

Browse files
authored
Create DeactivateIncAfter90Days.js
This script will deactivate all Incidents after 90 Days.
1 parent 77bce1e commit 2d21e0a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
var grInc = new GlideRecord("incident");
2+
grInc.addEncodedQuery("sys_created_on<javascript:gs.beginningOfLast90Days()");
3+
grInc.query();
4+
while(grInc.next()){
5+
grInc.setValue('active', false);
6+
grInc.update();
7+
}

0 commit comments

Comments
 (0)