Update the ritm short description if the sctask is closed

Joshua Comeau
Kilo Sage

What should the script be?

1 ACCEPTED SOLUTION

Zach Koch
Giga Sage

You would want to do an After business rule on your sc_task table with a condition of State changes to Closed, then run this script.

 

 

var ritmGr = new GlideRecord('sc_req_item');
if(ritmGr.get(current.getValue('request_item')) {
ritmGr.short_description = <your value here>
ritmGr.update()
}

 

 

View solution in original post

1 REPLY 1

Zach Koch
Giga Sage

You would want to do an After business rule on your sc_task table with a condition of State changes to Closed, then run this script.

 

 

var ritmGr = new GlideRecord('sc_req_item');
if(ritmGr.get(current.getValue('request_item')) {
ritmGr.short_description = <your value here>
ritmGr.update()
}