0
//delete them inactive records at once
var in= new GlideRecord('incident');
in.addQuery('active', false);
in.deleteMultiple(); //Deletes all the records in the record set
How to Delete Multiple records at a time in ServiceNow
admin Changed status to publish December 19, 2023