email client template attchment needs to add in the attchment field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2025 12:21 AM
I have created email client template for the negotiation table whenever I applied the template that time email content and email attachment is populated on the email template in the link format. instead of showing that attachment in the link format can we add that attachment in attachment field on the email template.
can we add the attachment in this attachment field instead of showing this attachment as an url on the email template.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2025 12:39 AM
check this and enhance as per your requirement
basically you want to include the attachment in the email and not the link
Copy attachments to Email Client Template (...)
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2025 12:45 AM
Hi @Ankur Bawiskar
this script will capture the attachment from the record and that attachment get captured on the email attachment but in my case I want to capture the attachment from the email template attachment not from the negotiation form record.
this above attachment i have to copy which i added in the email client template
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2025 01:00 AM
then enhance that business rule to pick the file from email client template record rather than the target record
something like this, but please enhance
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var lookforatt=new GlideRecord('sys_attachment');
lookforatt.addQuery('table_sys_id', 'sysId of email client template'); // give the sysId here
lookforatt.query();
if(lookforatt.next())
{
GlideSysAttachment.copy('incident', current.instance, 'sys_email', current.sys_id);
}
})(current, previous);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2025 03:01 AM
Hi @Ankur Bawiskar
Still, it copies the record attachments only not copying the email template attachment.