find RITM in Request Table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2023 09:25 PM
Hi.
I'm making My request Filter, and One problem occured.
When Using filter, I must use Request Table. but target column is inside of RITM.
Can i find that column?
Thank you for your answer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2023 12:56 AM - edited 01-04-2023 12:57 AM
Thank you for help. I working in My Request Filter module. I looking for way to dot-walking in that module.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2023 01:23 PM
Jaeik,
The issue is relationships. A Request (sc_request) can be related to multiple Request Items (sc_req_item), so if you have a REQ (Request) with 6 RITMs (Request Items) under it and you want the number field...what is it supposed to show you? There is no relationship in that direction for you to dotwalk. If you want to get RITMs associated to a REQ you need a query.
var grRITM = new GlideRecord("sc_req_item");
var reqSys = "";//sys_id of the Request record.
grRITM.addEncodedQuery("request=" + reqSys);
grRITM.query();
while (grRITM.next()) {//loop through all the RITMs under the REQ
gs.info('number: ' + grRITM.getValue('number'));//Print the RITM Number
}