Attachments from a reply email on a case

Gautam Gattu
Mega Expert

If there is an email that contains attachment and this email is received as a reply to an existing open case then the attachments are not visible from the case form. The user has to navigate to the email tab and open the email to view the attachments. 

1 ACCEPTED SOLUTION

Gautam Gattu
Mega Expert

Created 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);

View solution in original post

3 REPLIES 3

Maik Skoddow
Tera Patron
Tera Patron

Hi @Gautam Gattu 

OOTB the email attachments remain at the inbound email records, which makes sense in most of the cases.

If you want them on target record you have to implement that behaviour by yourself.

A simple and fast approach is to use a flow. On https://docs.servicenow.com/bundle/paris-servicenow-platform/page/administer/flow-designer/reference... you can find an example.

Kind regards
Maik

If my answer replied your question please mark appropriate response as correct so that the question will appear as resolved for other users who may have a similar question in the future.

Hi @Gautam Gattu 

Did my reply answer your question?

If so, please mark appropriate response as correct so that the question will appear as resolved for other users who may have a similar question in the future.

If not, please tell me what you are still missing.

Kind regards
Maik

Gautam Gattu
Mega Expert

Created 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);