- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2022 10:22 PM
Hi Guys,
We have built one catalog item and it has 5 tasks, once RITM is approved, tasks will create as per the custom workflow built for the specific catalog item.
We need same 'assigned to' auto assignment for 'task 3' from 'task 1'.
for ex: if 1st task is 'assigned to is ABC' and second task gets closed after that third task will create, for this 3rd task 'Assigned to should update as ABC' only, this is our requirement. please let us know how to achieve this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2022 10:57 PM
Hi Thanuja,
You can achieve this by following the process:
In Workflow for Task 1 creation - catalog task
In Advanced condition, write the below piece of code and update
workflow.scratchpad.lastTask=task.number;
and in the same workflow Task 3 creation - catalog task
In Advanced condition, write the below code and update
var gr = new GlideRecord("sc_task");
gr.addQuery("number", workflow.scratchpad.lastTask);
gr.query();
if (gr.next()) {
var AT = gr.assigned_to;
task.assigned_to = AT;
}
this will take 'assigned to from task 1' by using scratchpad and it will update 'same assigned to for catalog task 3'.
Please update the same in your workflow and confirm, if the solution works for you, please hit like or Accept the solution, others also know about this solution.
Thanks,
Harish.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2022 10:57 PM
Hi Thanuja,
You can achieve this by following the process:
In Workflow for Task 1 creation - catalog task
In Advanced condition, write the below piece of code and update
workflow.scratchpad.lastTask=task.number;
and in the same workflow Task 3 creation - catalog task
In Advanced condition, write the below code and update
var gr = new GlideRecord("sc_task");
gr.addQuery("number", workflow.scratchpad.lastTask);
gr.query();
if (gr.next()) {
var AT = gr.assigned_to;
task.assigned_to = AT;
}
this will take 'assigned to from task 1' by using scratchpad and it will update 'same assigned to for catalog task 3'.
Please update the same in your workflow and confirm, if the solution works for you, please hit like or Accept the solution, others also know about this solution.
Thanks,
Harish.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2022 11:43 PM
Hi Harish,
Thank you, solution works for us.