02-10-2022 11:13 AM
Hi
Please follow the steps below to achieve your requirement:
BR:
Table : Catalog Task
After Update
Condition of BR: State Changes;
Script:
(function executeRule(current, previous /*null when async*/) {
// Add your code here
if(current.state.changes()){
updateRITMState(current.request_item,current.state);
}
function updateRITMState(RitmID,state){
var gr = new GlideRecord('sc_req_item');
gr.addQuery('sys_id',RitmID);
gr.query();
if(gr.next()){
gr.state = state;
gr.update();
}
}
})(current, previous);
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke
0
Helpfuls