- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2019 02:47 PM
I've looked around and wasn't able to find a solution and maybe I'm not putting all the pieces together.
I need to get file attachments to be sent along within an approval email. I can get the attachment from an RITM to the sysapproval_approver record via a business rule. I can see that file is now visible in an approval record. I can't seem to get the files over to the email notification.
The notification is fired from an event and is triggered from the sysapproval_approver table via an event and I've set the "include attachments" option in the notification.
I was thinking the attachment would have to be in the request but that wasn't the case. What am I missing?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2020 08:42 PM
This was a simple fix though not necessarily logical.
You must copy the attachments from the source record to the target record. The notification will then be sent with the attachments when the event is triggered.
A business rule set to before and on insert should be sufficient. If this is specifically for an approval, the table in the BR is sysapproval_approver.
Add any conditions you need to the trigger.
In your script, simply add:
GlideSysAttachment.copy('your_source_table', current.sysapproval, 'sysapproval_approver', current.sys_id);
You can verify that this is working if you look at your attachments table. When the script runs, you'll see a copy of the attachment(s) from your source table to your target table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-10-2020 12:09 PM
Did you ever get this working? It's unfortunate that nobody has replied regarding this issue. It's happening to me as well. The approval record has an attachment, but that 'include attachments' checkbox doesn't work for a notification being triggered off the approval table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2020 08:42 PM
This was a simple fix though not necessarily logical.
You must copy the attachments from the source record to the target record. The notification will then be sent with the attachments when the event is triggered.
A business rule set to before and on insert should be sufficient. If this is specifically for an approval, the table in the BR is sysapproval_approver.
Add any conditions you need to the trigger.
In your script, simply add:
GlideSysAttachment.copy('your_source_table', current.sysapproval, 'sysapproval_approver', current.sys_id);
You can verify that this is working if you look at your attachments table. When the script runs, you'll see a copy of the attachment(s) from your source table to your target table.