incident resolve

Community Alums
Not applicable
 

 

 

4 REPLIES 4

Sandeep Rajput
Tera Patron
Tera Patron

@Community Alums Please post the snapshot of the business rule and script here. 

Danish Bhairag2
Tera Sage
Tera Sage

Hi @Community Alums ,

 

Here for ur requirement a BR will suffice. Try the below script n check if it works for u. BR should trigger when  state changes to resolved.

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

    // Add your code here

    var incidentGr = new GlideRecord('incident');
    incidentGr.addQuery('problem_id', current.sys_id);
    incidentGr.query();
    while (incidentGr.next())
       
       incidentGr.state = '6';
incidentGr.update();
    }


})(current, previous);
 

 

Thanks,

Danish

 

Community Alums
Not applicable

Tried with this BR but it is not working

Hi @Community Alums ,

 

Possible to share screenshot?

Also can we try to put some logs at the beginning to check whether the BR is triggering or not.

 

Thanks,

Danish