- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2023 04:02 AM
Hi,
When RITM is cancelled/closed Tasks should cancel or close . Approvals No longer required.
var catTask = new GlideRecord('sc_task');
catTask.addQuery('request_item', current.sys_id);
catTask.addQuery('active',true);
catTask.query();
while (catTask.next())
{
catTask.state = 3;
catTask.work_notes = "Closing Task as RITM is closed";
catTask.update();
}
I have written a after BR, Code does not work.
The Tasks are getting closed just fine but the RITM state automatically moves to "Closed Incomplete" though I am marking it as Closed Complete , once the form reloads it moving to "closed incomplete". Not sure why.
HELP?
Thanks,
Vaishnavi
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2023 03:13 AM
Use a branch activity in below workflow, branch activity basically divides the workflow into 2 paths. Since you are generating at the same time you should use branch and divide the flow.
After that use join to convert to paths into one as below screenshot:
Please mark it Correct if it resolves your query
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2023 03:13 AM
Use a branch activity in below workflow, branch activity basically divides the workflow into 2 paths. Since you are generating at the same time you should use branch and divide the flow.
After that use join to convert to paths into one as below screenshot:
Please mark it Correct if it resolves your query