script include delete record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2022 07:47 PM
I want to delete the records in the table whose system name is the same as the status of abolished,
Executed when the next record is created。Urgently need your help
var CommonInfo_Grr = new GlideRecord('table');
//CommonInfo_Grr.initialize();
CommonInfo_Grr.addQuery("status", "abolished");
CommonInfo_Grr.addQuery("system_name",current.getValue("system_name"));
CommonInfo_Grr.query();
while(CommonInfo_Grr.next()) {
CommonInfo_Grr.addQuery("status", "abolished");
CommonInfo_Grr.deleteMultiple();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2022 12:11 AM
Hello
Please share the updates on this if you are able to achieve what you want or still you are not able to delete the records. If you are still facing the issue then please put the screenshot highlighting the records you want to keep in table and the one you want to delete. It will help to understand your requirement.
Thanks