Get a first look at what's coming. The Developer Passport Australia Release Preview kicks off March 12. Dive in! 

How to Change the Change Request state back to the Previous State

SayanG838505890
Tera Contributor

Hello Team,

Recently I have created a New RFC type(Informational) for Change Request.

For That I have created a BR. Which will work only when change task of RFC type is Informational.
But the BR is not correct and impacted the rest of the RFC Type.
Now I have disabled the BR, but now I want to make the Change Request state back to Previous state.
Condition:

SayanG838505890_0-1765967328409.png

 

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

    var change_request = new GlideRecord('change_request');
    change_request.addQuery('change_request',current.sys_id);
    change_request.query();
    while(change_request.next()){
        change_request.setWorkflow(false);
        change_request.state = 0;
        change_request.update();
    }

})(current, previous);



Now Please help me to change the state of the Impacted Change Request to the Previous State
Thanks in advance
0 REPLIES 0