
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2016 10:58 AM
To start this off, there are a lot of threads that ask this question. To clarify, I do not want to attach an attachment from current record, thus that include attachments checkbox won't do the job for me.
We are wanting to send a particular PDF document (it is a static pdf that does not change and contains a checklist that the users are to follow) as an attachment in an email, not as a link to an attachment file. Since we are wanting to actually attach the record, this code will not work...
template.print ( 'Attachment: <a href="/sys_attachment.do?sys_id=' + gr. sys_id + '">' + gr. file_name + '</a>\n ' ) ;
...as it is a link and not an attachment.
So, to my question, if I know the sys_id of the attachment that I want to include in an email notification, is there a mail script that I can use that will attach that particular file to the notification so that it will be sent with the email?
Thanks in advance for any assistance in this.
https://youtube.com/watch?v=zYi8KhP9SUk
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2016 11:19 AM - edited 05-08-2023 03:55 PM
You mentioned there are a lot of similar threads, but have you looked at this post - Sending Documents in an Email Notification It would seem to be what you are looking for.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2016 11:14 AM
What about running a business rule that attaches it to the notification before insert?
Edit: forgot to add the code
Using GlideSysAttachment.copy('sys_attachment', sys_id of attachment, 'sys_email', current.sys_id) should work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2016 11:19 AM - edited 05-08-2023 03:55 PM
You mentioned there are a lot of similar threads, but have you looked at this post - Sending Documents in an Email Notification It would seem to be what you are looking for.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2016 11:36 AM
Jim, I believe that you are correct. We will give this a shot and I will update this with my findings. Thanks!
https://youtube.com/watch?v=zYi8KhP9SUk

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2016 03:38 PM
Thank you sir. This was exactly what I needed.
https://youtube.com/watch?v=zYi8KhP9SUk