Ticket Attachment Widget

Vikram3
Giga Guru

Hi all,

I have configured the Ticket Attachment widget in RITM approval for the approvers. They can able to view the attachments when there is an attachment available in RITM. 

Few attachments will be in REQ itself. I need to bring those attachments here. Please assist.

Thanks.

4 REPLIES 4

Shweta KHAJAPUR
Tera Guru

Hi Vikram,

You can make use of the below method in BR in order to copy it to  RITM.

GlideSysAttachment.copy('sourcetable','sys_id','destinationtable','sys_id');

Thanks for the reply Shwetha. I need the attachment to one specific RITM when request is raised.

Kalaiarasan Pus
Giga Sage

Can you share the widget code so that people can look and suggest edits?

Hi Kalai,

I have attached the widget code. Also below is the Async Insert BR where attachment will be moved to RITM.

My requirement is it has to move to one specific item so that approver can able to see that in portal.

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