- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2023 04:40 AM
Hi,
I am getting object when I'm gliding the record, I want to get the number of RITM. How we can achieve this ?
Please some one help me with this. Thanks in advance
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2023 05:16 AM
Ahh ok! you are querying with number so your addQuery should be like below
gr.addQuery('parent.number',numb);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2023 04:50 AM
Hi,
Please add gr.next() after the query then you will get the number.
If you want to the full gliderecord object then after the gr.next() put the below lines
var responseObject = {}; //hashmap object variable to store final response
var getData = new GlideRecordUtil().getGR("sc_req_item", "gr.sys_id"); //pass the table name and Record sys_id to get the GlideRecord instance
var ignoreFields = {"sys_created_on": true, "sys_updated_by": true}; //Pass the fields that you want to exclude in the final response
new GlideRecordUtil().populateFromGR(responseObject, getData, ignoreFields); //The main function to retrieve the data
gs.print(JSON.stringify(responseObject, null, 4)); //Decode the object
Regards,
Vivek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2023 05:11 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2023 05:16 AM
Ahh ok! you are querying with number so your addQuery should be like below
gr.addQuery('parent.number',numb);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2023 05:30 AM
Hi @VivekSattanatha ,
yes now it's displaying the RITM number, but the parent value associated with multiple RITM's but the result is displaying only one RITM