- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2023 06:54 AM
Hello Experts,
We have received a requirement from client , we want the attachment added by task handler on sc_task table should get copied on another task so that concerned team can download the attachment added and do the needful
How can we achieve this?
All suggestions are welcome here,
Thank you,
Ujjwala
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2023 07:07 AM - edited 03-23-2023 07:09 AM
Refer this sample code:Create before insert business rule
var task = new GlideRecord('sc_task');
task.addQuery('request_item',current.request_item);//check proper names for Ritm reference field on sc_task record
task.query();
if(task.next()){
- GlideSysAttachment.copy('sc_task', current.sys_id, 'sc_task',task.sys_id);
}
Thanks and regards,
Manjusha .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2023 07:20 AM
Hey Thanks 😀 It worked for me!!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2023 07:13 AM
Hi,
Instead of copying attachments between records in this way, I would instead suggest that you create a new related list, which show all attachments from other catalog tasks that are related to the same requested item.