Copy attachments from one catalog task to another
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 12:39 AM - edited 09-14-2023 09:01 PM
I have 4 catalog tasks, I want to copy all attachments from Task 1--> Task 2---> Task 3 --> Task 4 ---> Task 5.
Wrote a Before insert BR on sc_task table with condition as Cat item is "ABC" and State is 'Open'
var task = new GlideRecord('sc_task');
task.addQuery('request_item',current.request_item);
task.query();
if(task.next()){
gs.addInfoMessage('Triggered');
GlideSysAttachment.copy('sc_task', task.sys_id, 'sc_task',current.sys_id);
}
It goes inside if condition but not copying attachment
How can i achieve this ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 01:16 AM
Hello @Mishu
Plz Mark my Solution as Accept and Give me thumbs up, if you find it helpful.
Regards,
Samaksh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 10:22 AM
@Ankur Bawiskar .. need your help here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 11:30 AM
Do you really want to be copying attachments? This might be a better solution: TNT: "Related Attachments" Related List
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 09:00 PM
Yes the requirement is like that only .