Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Attachment

Anusha Medharam
Tera Contributor

How to add attachment to the case form when customer send one attachment through email.

5 REPLIES 5

Maik Skoddow
Tera Patron
Tera Patron

Hi @Anusha Medharam 

is this is one time activity? In that case you can upload the attachment to case.

Maik

yes

 

Community Alums
Not applicable

Hi @Anusha Medharam ,

You can create a BR on sys_attachment table

After & Insert

Filter - sys_id is not empty

==============

(function executeRule(current, previous /*null when async*/) {

var sys_id = current.table_sys_id;
var att = new GlideRecord('sys_attachment');
var catt = new GlideRecord('sn_customerservice_case');
att.addQuery('current.table_sys_id');
att.query();
if (att.next()) {
GlideSysAttachment.copy('att', current.sys_id, 'catt', sys_id);
}

})(current, previous);

Taken from :

https://www.servicenow.com/community/itsm-forum/attachments-from-a-reply-email-on-a-case/m-p/608190