Help setting request short description
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 11:36 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 12:57 PM
the br is created on the sc_request table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 01:10 PM - edited 08-02-2023 01:12 PM
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();
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 02:30 PM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 02:58 PM
Condition of BR is wrong.
it should be : current.cat_item.name == 'Project Management Request'
Chanage it and test again
Regards,Sushant Malsure
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2023 09:19 PM
@Gemma4 did it work ?
Regards,Sushant Malsure