Set RITM to same state as Catalog task
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-30-2024 08:50 AM
Hi All!
I've got one form, where the team have requested that the RITM shows as Open state until the task is assigned, at which point it changes to Work in Progress State. I have done this, but now, when the task is closed, the RITM stays as work in progress rather than Closed Complete.
I did this using a business rule.
Does anyone know how I can fix it so that the RITM shows as Closed Complete once the sc_task is closed?
This is my business rule:
and the advanced script is the below:
(function executeRule(current, previous /*null when async*/) {
var getritm=new GlideRecord('sc_req_item');
getritm.addQuery('sys_id',current.request_item);
getritm.query();
if(getritm.next())
{
getritm.state=current.state;
getritm.update();
}
})(current, previous);
Thanks 🙂
0 REPLIES 0