Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2022 09:12 PM
Hi,
then you can have after insert BR on sc_req_item table
Condition: current.cat_item.name == 'Your Item Name'
Script:
if(current.variables.attachmentVariable == ''){
var gr = new GlideRecord("sys_attachment");
gr.addQuery("table_sys_id", current.getUniqueValue());
gr.query();
if (gr.next()) {
gr.deleteRecord();
}
}
Regards
Ankur
Regards,
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader