- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2020 09:41 AM
Hi,
I have a catalog client script that is calling a script include. However the variable is coming back as a sys_id, and I want it to come back as a display value. I have tried using .getDisplayValue() on the sys_id but it just shows up blank on the form. I am referring to line 22 on the catalog client script and 13 on the script include. Anyone see what I am doing wrong?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2020 09:45 AM
Hi Jared,
For Script include's line 13 can you replace
snResponse.push(snRecord.u_itd_cost_center.toString());
with below
snResponse.push(snRecord.u_itd_cost_center.getDisplayValue().toString());
use getDisplayValue() in server side rather than client side.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2020 09:45 AM
Hi Jared,
For Script include's line 13 can you replace
snResponse.push(snRecord.u_itd_cost_center.toString());
with below
snResponse.push(snRecord.u_itd_cost_center.getDisplayValue().toString());
use getDisplayValue() in server side rather than client side.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2020 09:47 AM
Hi,
In your script include, you should be able to dot-walk to the name, if that's available, like:
snRecord.u_itd_cost_center.name
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!