Skip to content

Commit 6a809de

Browse files
authored
Create DeleteIncident.js
Delete only those incident which are closed
1 parent cef6b09 commit 6a809de

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
var gr = new GlideRecord('incident');
2+
gr.addQuery('state', '7');
3+
gr.query();
4+
var count = 0;
5+
while (gr.next()) {
6+
gr.deleteRecord();
7+
count++;
8+
}

0 commit comments

Comments
 (0)