Approvers can't see RITM attachments

Vikram3
Giga Guru

Hi all,

I am trying to copy attachments from RITM to sysapproval table. But it doesn't work. Relationship is working fine. But relationship attachment won't show in portal 'Ticket Attachment' widget. 

My question is how to copy attachment from RITM to approval table and make it display in 'Ticket Attachment' widget.

Thanks in advance.

Regards,

Vikram

 

1 ACCEPTED SOLUTION

Hi Bryan,

A big thanks for your support and your valuable time. It finally worked after making below changes,

Table - sysapproval_approver

Async BR

(function executeRule(current, previous /*null when async*/)
{
var gr = new GlideRecord('sc_req_item');
gr.addQuery('sys_id', current.sysapproval);
gr.query();
if(gr.next()) {
GlideSysAttachment.copy('sc_req_item', gr.sys_id, 'sysapproval_approver', current.sys_id);
}
})(current, previous);

View solution in original post

10 REPLIES 10

Hi Bryan,

A big thanks for your support and your valuable time. It finally worked after making below changes,

Table - sysapproval_approver

Async BR

(function executeRule(current, previous /*null when async*/)
{
var gr = new GlideRecord('sc_req_item');
gr.addQuery('sys_id', current.sysapproval);
gr.query();
if(gr.next()) {
GlideSysAttachment.copy('sc_req_item', gr.sys_id, 'sysapproval_approver', current.sys_id);
}
})(current, previous);