Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2024 12:49 AM
Hi @SunilKumar_P ,
If its still not working you can try writing BR to set the state value of both ritm and request,
You can Try after update BR
Table: sc_req_item
condition as shown below,
Note: better to keep your catalog item in condition so that it will not run for others,
In action, to update requested item state
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang
In advanced, to update Request table
code
(function executeRule(current, previous /*null when async*/) {
var reqUpdate = new GlideRecord('sc_request');
reqUpdate.addQuery('sys_id',current.request);
reqUpdate.query();
if(reqUpdate.next()){
reqUpdate.state = 4 ;
reqUpdate.request_state = 'closed_cancelled';
reqUpdate.update();
}
})(current, previous);
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang