Task attached to one catalog task should reflect in other
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-24-2023 10:00 PM
Hi friends,
I am working on RITM workflow.
During entire flow, I am creating 5 catalog tasks one after the other for 5 different groups. My requirement is that when a group attaches a file to catalog task then the same file should be attached to other catalog tasks (even to those which are closed complete). So at the end of RITM close, all the tasks should have same files attached.
I am thinking to write code in workflow to attach the file in next group.
For previously completed tasks, I am thinking to write a business rule to copy the attachment.
Please suggest.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-24-2023 10:17 PM
Hi,
Are you using a flow or a workflow?
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-24-2023 10:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-24-2023 10:45 PM
Hi,
You can save the sys_id of tasks in the scratchpad variable in the respective task activity using below line of code.
workflow.scratchpad.task1_sys_id=task.sys_id;
Use above scratchpad in the next task activity with below lines of code to copy all the attachment.
var attachment = new GlideSysAttachment();
attachment.copy('sc_task', workflow.scratchpad.task1_sys_id, 'sc_task', task.sys_id);
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2023 10:07 PM
Thank you for your reply. I will implement and check. Will post here if any doubts.
Thanks again.