- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2016 07:44 PM
I would like an inbound action to check the extension of an attachment to make sure it is .xls otherwise throw an error.
Can i use content_type?
Any help appreciated
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2016 10:34 PM
Try this
var getCurrentMail = new GlideRecord('sys_email');
getCurrentMail .get('uid', email.uid);
var emailSYSID = getCurrentMail.sys_id.toString();
var checkAttachment = new GlideRecord('sys_attachment');
checkAttachment.addQuery('table_sys_id', emailSYSID);
checkAttachment.addQuery('file_name','CONTAINS', '.xls');
checkAttachment.query();
if(checkAttachment.next()){
//Email Has Excel
}
else{
//Email Has No Excel
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-02-2016 10:54 PM
Thank you!!!