Sandeep Rajput
Tera Patron

@Rosy14 Please update the script as follows.

 

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

    // Add your code here
    gs.addInfoMessage("before "+current.parent.state);
    var parentRec = current.parent.getRefRecord();
    parentRec.state = 3;
    //current.parent.active = false;
    parentRec.update();
    gs.addInfoMessage("after "+current.parent.state);
})(current, previous);

Hope this helps.

View solution in original post