Request description need to populated from RITM description
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 01:28 AM
I have written one BR to populate Request description from RITM description once RITM got created.
Below is the code:
var req = new GlideRecord ('sc_request');
req.addQuery('sys_id',current.request);
req.query();
if(req.next()){
req.description = current.description;
req.update();
}
But its not working. The same is working from Background script. Please help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 02:49 AM
Thats correct , I am using after insert BR with RITM desc is there
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 04:41 AM
Hello @Rakesh11 ,
Try to use async BR, as the REQ record is created after RITM creation.
If this solves your query mark this as correct and helpful.
Thanks
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 06:06 AM
Hi @Community Alums ,
I tried async as well but no luck:
var req = new GlideRecord ('sc_request');
req.addQuery('sys_id',current.request);
req.query();
gs.log("description 1234 " + current.request);
if(req.next()){
gs.log("description 1234 " + current.description);
req.description = current.description;
gs.log("Testing ritm 12345 " + req.description);
req.setWorkFlow(false);
req.update();
}
it is not going inside if since sys_id is not getting queries in line 2