- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2021 01:07 AM
Here we have an issue in RITM, when the RITM already approved and when the child task is closed incomplete then RITM state will be closed incomplete. but Approval is setting as Rejected. because of this rejected notification is triggering.
can someone help on this
this is the script have in the workflow on the last activity before END activity which will set the values based on task
var c_task = new GlideRecord('sc_task');
c_task.addQuery('request_item', current.sys_id);
c_task.query();
if (c_task.next()) {
var req = current.request.getRefRecord();
if(c_task.state == 3)
{
current.state = 3;
current.stage = 'complete';
current.approval='approved';
req.state = 3;
req.update();
}
else if(c_task.state == 4)
{
current.state = 4;
current.stage = 'Request Cancelled';
req.state = 4;
current.approval='approved';
req.update();
}
else if(c_task.state == 7)
{
current.state = 7;
current.stage = 'Request Cancelled';
req.state = 4;
current.approval='approved';
req.update();
}
}
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2021 01:33 AM
Hi Roxi,
There is out of the box business rule "reject approval on closed incomplete" on Requested Item <sc_req_item> table. This BR is responsible for your issue, it set approval as rejected when any RITM is closed Incomplete.
You need to make required changes to this OOB BR.
1. Disable it by setting active=false and create a duplicate BR and make required changes like adding condition so that it will not run for your catalog item.
2. If you don't want this behavior for all catalog items then simply deactivate it.
Please mark helpful and correct answer if this resolves your issue.
Thanks,
Anil Lande
Thanks
Anil Lande

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2021 01:33 AM
Hi Roxi,
There is out of the box business rule "reject approval on closed incomplete" on Requested Item <sc_req_item> table. This BR is responsible for your issue, it set approval as rejected when any RITM is closed Incomplete.
You need to make required changes to this OOB BR.
1. Disable it by setting active=false and create a duplicate BR and make required changes like adding condition so that it will not run for your catalog item.
2. If you don't want this behavior for all catalog items then simply deactivate it.
Please mark helpful and correct answer if this resolves your issue.
Thanks,
Anil Lande
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2021 01:57 AM
Excellent Anil, Got it . will take change accordingly Thanks Much