logo

NJP

Add Attachments to the Email Client Template automatically

Import · Jul 27, 2022 · article

To add all the attachments in the Email Client Template please follow the below procedure:

Create a Business Rule on the sys_email table with conditions before insert.

Script :

var att = new GlideRecord('sys_attachment'); att.addQuery('table_sys_id', current.instance); att.query(); if (att.next()) {

GlideSysAttachment.copy('', current.instance, 'sys_email', current.sys_id);

}

/*Record Table Name- Source Table name. eg:- Suppose Email template is on the Incident table then we have to mention incident as the source table*/

Please the attached screenshot to know the output.

Please mark this article helpful if it helps you.

image

View original source

https://www.servicenow.com/community/itsm-articles/add-attachments-to-the-email-client-template-automatically/ta-p/2306006