- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2024 10:47 PM
Hello
Currently, in the related list of RITM, related change records are displayed. When I open the change the records, the corresponding RITM should be displayed in the change record's related list. For that, I have configured a BR:
Table: change_request
When to run: after insert, update
Script:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2024 12:05 AM
Hi @ArpitaVK
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2024 11:09 PM
Hi @ArpitaVK updated your script:
var parentSysId = current.parent;
var ritmRec = new GlideRecord('sc_req_item');
ritmRec.addQuery('sys_id',parentSysId );
ritm.query();
//for multiple ritm do a while loop to get all records matching parent sysid
while(ritm.next())
{
ritmRec.parent = current.sys_id;
ritmRec.update();
}
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2024 11:44 PM
Hello @Harish KM
I updated the script, but now no any change record has RITM in its related list. I even added the logs to check upto which line the code is running; not a single log is recorded.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2024 11:55 PM
Hi @ArpitaVK how are you creating change from RITM? which field on change holds ritm syssid?
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2024 11:59 PM
Hi @Harish KM
I am creating change on RITM using either of the following two ways:
1. creating new change request record from the related list
2. editing the change request related list (slushbucket)
And 'Parent' field on the change request record holds the number of RITM.