How to dot walk from user table to core country table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2022 04:57 AM
Hello All
I have a requirement as below:
Navigate from user table to core country table for a field value.
sys_user > cmn_location > core_country.
The user table contains a OOB field 'Location' from there I will direct to a customized field 'Country' on cmn_location table and then I need to fetch the data on ISO Short field value on core_country table.
Note: Al these are reference fields.
I want guidance on formulating this in a script include to compare the value of ISO Short field with incoming data.
Regards
Souvick
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2022 05:04 AM
Hi,
Use below code
location.country_field.getDisplayValue();//to get the value of the field
or
location.country_field.getValue();//to get the sys_id of the field
Mark this as Helpful/Correct, if Applicable.
Regards,
Sourabh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2022 05:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2022 05:37 AM
In order to have dynamic user in gr.addEncodedQuery , what will be the code in script include. In background script , I can see value for sys id, but what will be in script include?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2022 06:53 AM
Hi,
What is the condition on which this functionality will run?
Ex. On creation of new user in sys_user table.
In that case you need to write the BR on user table and call the script include.
Let me know the details to provide you the script.
Regards,
Sourabh