SysID of a record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 08:28 AM
Hello,
Im still new in coding and having some trouble.
I am currently building a display business rule and client script. In the advance tab in the display BR I need to query the gliderecord to get the sysid of the field "other" (which is 'u_category') from another reference table('u_tracked_table')
Heres what I have so far but I am blocked:
var gr = new GlideRecord('u_tracked_table');
gr.addQuery('sys_id', u_category.sys_id);
gr.query();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 08:45 AM
Hi @asher14
The requirement is not clear in your question. Maybe you can explain it properly so we can help you here!
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 10:04 AM
Hello,
thank you for replying with feedback. It is a two part requirement and I want to focus on part 1 first because I believe I can explain a better.
How do i create a gliderecord to the reference table that gets the sys_id of a field on a record. The field name is called Other however in the backend on that table it is name 'u_category'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 10:18 AM
Hi @asher14
So what I understood here is you need sys_id of a field present on another table.
Here if you need sys_id of field then do the GlideRecord on the sys_dictionary table and use EncodedQuery as per need.
Thank you!
Please mark this response as correct and helpful if it helps you ✔️👍
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-16-2023 08:52 AM