Automatically include attachments from TASK, on Email client , Client Template

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2019 09:13 AM
Hi all,
I've created a Client Template for the first time, to be used in the Email Client I've enabled on a custom app. End users pretty happy with what it's doing (Really like how easy it was to make the template) but they have asked is it possible for the template to automatically include as attachments, any attachments present on the Task itself?
I can't see any obvious option for this. So to re-iterate, a TASK is logged with attachments, our users then use the email client to email a third party. And they want the attachments on the TASK to appear on the template, so they dont have to download and re-attach.
I'm not seeing how I make the attachments present on the TASK, populate onto the mail. (The attachment you see is an img from a signature that is to appear on every outbound mail in this app)
- Labels:
-
Scoped App Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2019 09:23 AM
Hi Daniel,
you can use the following function to attach a file from a record to another:
var gr = new GlideSysAttachment();
gr.copy('target_table',targetRecordSysID, 'source_table, sourceRecordSysID);
My suggestion is to use an automated script, which, based on certain conditions, will attach the files you need from a dummy record to the template.
Let me know if it helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2019 09:25 AM
In email notification there is a option to Include Attachment. If you check the Check box the attachments are included.
Pls refer this link
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2019 05:48 AM
Can you guide me to this tickbox? I don't see one anywhere, and the url provided doesn't have a screenshot either
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2019 09:41 AM
Hi ,
By looking at the information and image , I am not able to understand if the record exist on the same record ( facility management ) or some other related records .
If the attachment is on same record , I think include attachment checkbox on notification should do the job .
If the attachment is on some related record of the mail record . In that case , you have to write an email script and use following code to attach the attachment in mail .
template.print ( 'Attachment: <a href="/sys_attachment.do?sys_id=' + gr. sys_id + '">' + gr. file_name + '</a>\n ' ) ;
Thanks,
Mukesh