When RITM state is Set to Close Complete/Incomplete/skipped related catalog task should also close Complete/Imcomplete/skipped.

Niharika20
Tera Expert

We have requirement, when we RITM state changes to Close Complete/Incomplete/skipped the its related service catalog task should also close. For that i wrote the below business rule but is is not working, can someone please assist?

find_real_file.png


var gr = new GlideRecord('sc_req_item');
gr.addQuery('request_item',current.request_item);
gr.addQuery('active',true);
gr.query();
if(!gr.next()) {

var sc_task = new GlideRecord('sc_task');
sc_task.addQuery('sys_id',current.request_item);
sc_task.query();
if(sc_task.next())
{
//update the fiel of sc_task
sc_task.update();
}

1 ACCEPTED SOLUTION

Thanks Alok, Business rule is working but when i tried cancelling the RITM from portal it is not working. As you said may be i should include script in widget itself.

View solution in original post

12 REPLIES 12

Thanks Alok, Business rule is working but when i tried cancelling the RITM from portal it is not working. As you said may be i should include script in widget itself.

In my case , when pressing the UI button cancel RITM, the state should move to Cancelled but it is moving to Closed Complete. any idea on this?

 

We also has this issue like this,

How to fix, please help