- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2018 10:56 PM
Hi All,
I am using g_form.getReference to populate users details in a catalog item via client script. For a few fields in user profile like Business Unit, Department, cost center, I am getting the sys_id instead of the display value.
Since these fields are reference field , the value returned is sys id. How can i get the display value instead of the sys id.
var user= g_form.getReference('requested_for');
g_form.setValue('business_unit',user.u_business_unit.u_name); ///business unit is a reference field on user table
I understand i can use asynchronous glide record in the client script to populate. but not sure if that is recommended
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2018 11:52 PM
Hi Priyanka,
I think the best way to achieve this is by using Glide Ajax. Send the sysid to the script include, query the tables and return all the display values in an array.
Thanks,
Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2018 11:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2018 11:10 PM
Or
go to u_business_unit table and set display check checkbox fro name column.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-20-2018 11:43 PM
Hi Upender, thanks for your assistance. I would like to avoid making dictionary level changes in the custom tables. Is there any other way to achieve the requirement, preferably via catalog client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2018 01:58 AM
Hi,
I have searched but not found any other solution.
Please share if you found solution other then setting display column.
Thanks