- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2018 06:33 PM
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2018 12:22 AM
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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2018 12:22 AM
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);