What updates the Change Request when a Change Task is closed?

tee3
Giga Expert

Hi SN Community,

I'm wondering if anyone knows what triggers an update to the Change Request when a Change Task is closed? We've created a new state for Change Tasks and are noticing that when a task is closed with the new state, the Change Request does not update which causes an issue with "Wait for Condition" activity in the workflow.

Appreciate any help.

1 ACCEPTED SOLUTION

You can do that... it's just another business rule. Something like this:



Name: Force change update


Table: Change task (change_task)


Advanced: true


When: after


Insert: true


Update: true


Condition (blank)


Script:



(function executeRule(current, previous /*null when async*/) {



        var chg = new GlideRecord('change_request');


        if (chg.get(current.change_request)) {


                  chg.setForceUpdate(true);


                  chg.update();


        }



})(current, previous);


View solution in original post

6 REPLIES 6

You can do that... it's just another business rule. Something like this:



Name: Force change update


Table: Change task (change_task)


Advanced: true


When: after


Insert: true


Update: true


Condition (blank)


Script:



(function executeRule(current, previous /*null when async*/) {



        var chg = new GlideRecord('change_request');


        if (chg.get(current.change_request)) {


                  chg.setForceUpdate(true);


                  chg.update();


        }



})(current, previous);


That works too. I was just curious as to what is OOB. Thanks for your help.