Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2024 05:33 AM
Hi @jaubert ,
Please follow as suggested by @Mark Manders and @Community Alums
Use below updated code as shared by @Community Alums .
var grSysEmail = new GlideRecord('sys_email');
grSysEmail.addEncodedQuery("mailbox=outbox^state=ready");
grSysEmail.query();
grSysEmail.setWorkflow(false);
grSysEmail.deleteMultiple(); // deleteMultiple doesn't required result set iteration
-Thanks,
AshishKM
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution