Help setting request short description

Gemma4
Mega Sage

Hi everyone,

I have a requirement to set the order guide request short description to include the variable answer of request_name. Currently the short description is showing the catalog item name instead. Attached is the code of the br I am using.

 

thanks in advance for any insight you can provide

21 REPLIES 21

the br is created on the sc_request table

I think thats the issue, by the time when this BR executed RITM might not be created.

Also 'cat_item' is not present on sc_request but on sc_req_item.

So, Change the BR to

After Insert BR on sc_req_item , table

in script :

 

var gr_req = new GlideRecord('sc_request');
gr_req.addQuery('sys_id',current.request);
gr_req.query();
if(gr_req.next()){
gr_req.short_description = current.variables.request_name;
gr_req.update();
}
current.short_description = current.variables.request_name; // this part is for setting short desc of RITM
current.update();

 

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure

Thank you for the help @sushantmalsure 

ATtached is what I changed and also changed  the BR to

After Insert BR on sc_req_item , table and no luck on short description getting changed on RITM or Request. Any other ideas I can try?

 

 

@Gemma4 

Condition of BR is wrong.

it should be :  current.cat_item.name == 'Project Management Request'

Chanage it and test again

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure

@Gemma4  did it work ?

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure