- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-23-2020 07:41 AM
Hi,
I have a requirement to allow users to add attachments from the existing incident record when using the email function.
I have come across articles, which leverage before BR and attaches all the attachments to the email.
I do not want that, In the email when i click on the attachment icon, I should see all the attachments from the incident there.
Also I have seen BR scripts which duplicate the attachment when sent.
Please help.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2020 10:11 PM
can you try with below code.
After "Insert" business rule on "sys_email" table .
script:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
GlideSysAttachment.copy(current.target_table, current.instance ,'sys_email', current.sys_id);
})(current, previous);
See if its not creating duplicate attachment on email client.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2020 04:28 AM
Hi Usmaan,
I remember commenting on this thread strangely cannot find my comments. Did you check article link as proivded in comments before. It will copy all attachments & in case you will to remove you can remove it by clicking the Attachment icon.
Unsure if you requirement is something different.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2020 04:33 AM
so if you look at the screenshot below, you can see I only have 2 attachments in the incident, but when copied to mail client, it shows duplicates.
However, I do not want attachments to show there automatically, I want them to only show when I click the attachment icon as below, and then I should be able to choose which attachments I want to attach.
Please can you help on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2020 06:32 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2020 10:11 PM
can you try with below code.
After "Insert" business rule on "sys_email" table .
script:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
GlideSysAttachment.copy(current.target_table, current.instance ,'sys_email', current.sys_id);
})(current, previous);
See if its not creating duplicate attachment on email client.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2020 01:31 AM
Hi Harshvardhan,
Thanks duplicates are no longer showing now.
Now is there a way to not have the attachments attach when automatically, so i get to choose which atachments I want to send with the email by clicking on the attachment icon.
Or is that not possible? because it is not ideal to send all attachments with every email.