- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-15-2019 02:35 PM
Requirement is for inbound email created incidents of a certain condition (category) to delete any attachment on the incident created. Idea is that for a certain group handling security ops type of tickets, we don't want malicious payloads being attached to the ticket (we dont have the secops module yet).
Guessing this cant be done via the inbound action, so presuming a business rule or other will be needed.
this thread looks promising but i'm not figuring out how to convert it to work for incident tickets.
any advisement appreciated, thanks.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-18-2019 09:31 PM
Here is the easy method with script.
1. Go to Business Rules
2. Select table as "Incident"
3. select "Advanced = true"
4. Go to "When to run" tab and add condition as "Category = <Your_category>"
5. When = before
6. Insert = true
7. Add the following script
(function executeRule(current, previous /*null when async*/) {
var attach = new GlideSysAttachment();
attach.deleteAll(current);
})(current, previous);
Let me know how that goes or if you have any questions. Mark this thread as answered if this helps resolve your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2019 07:22 AM
Wow that was much simpler than the script i was attempting and appears to work great in my initial testing. thank you Raghu!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-15-2019 03:30 PM
Hi Raghu,
I tried using the same script mentioned by you but it didnt work in my case.
However, I wanted to point out that I am using the exact similar function on case table - sn_customerservice_case which belongs to the Customer Service Application Scope.
Will the application scope change have any effect? I have no clue why the attachments arent getting deleted on insert through inbound email actions.
Regards,
Wasim