- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-15-2020 11:34 PM
Ist that Possible?
check();
function check() {
var gr = new GlideRecord("hr_case");
gr.addActiveQuery();
gr.addQuery('parent.template', '16c971f9db58ec14066c4f63059619b8');
gr.query();
gr.next();
gs.info(gr.parent.template);
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-16-2020 01:28 AM
check();
function check() {
var gr = new GlideRecord("hr_case");
gr.addActiveQuery();
gr.addQuery('parent.ref_sm_order.template', '16c971f9db58ec14066c4f63059619b8');
gr.query();
gr.next();
gs.log(gr.number);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-16-2020 12:00 AM
i do gr.next on line above.
This a the error
QueryEventLogger: Invalid query detected, please check logs for details [Unknown field parent.template in table hr_case]
If i use get(oneRecord)
and then gs.info(gr.parent.template);
i get the right result...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-16-2020 12:04 AM
As Mark Suggested, just make sure its the correct table .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-16-2020 12:09 AM
it is !
i told that im able to get the gs.info(gr.parent.template) if is use
var gr = new GlideRecord('hr_case');
gr.get(SYSID of existing Record)
gr.query();
gr.next();
gr.parent.template

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-16-2020 12:12 AM
Can you try using Encoded query, its just a guess it might work.
gr.addEncodedQuery('parent.template=' +'16c971f9db58ec14066c4f63059619b8');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-16-2020 01:28 AM
check();
function check() {
var gr = new GlideRecord("hr_case");
gr.addActiveQuery();
gr.addQuery('parent.ref_sm_order.template', '16c971f9db58ec14066c4f63059619b8');
gr.query();
gr.next();
gs.log(gr.number);
}