Skip to content

Commit 3e750c3

Browse files
authored
Create script.js
1 parent a67cdb7 commit 3e750c3

File tree

1 file changed

+8
-0
lines changed
  • Specialized Areas/Fix scripts/Delete Obsolete SNC Control Access Records

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+
/*
2+
SNC Access Controls table is used to provided access to servicenow technicians when they need access for troubleshtting any instance issue.
3+
This script will delete the SNC access control records which have past end date for better table management.
4+
*/
5+
var delSncAccess = new GlideRecord('snc_access_control');
6+
delSncAccess.addEncodedQuery('end<javascript:gs.beginningOfToday()'); // end date is before today;
7+
delSncAccess.query();
8+
delSncAccess.deleteMultiple(); // delete all snc access records whith past end date.

0 commit comments

Comments
 (0)