
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2018 01:41 PM
Evening All,
I am trying to get a display value from an incident form field using an onChange client script.
My current code:
var client = g_form.getValue('company');
alert("Client: " + client);
is returning a sys_id instead of the value and since client scripts don't support getDisplayValue I am at a loss. I've seen a bunch of different code snippets to get around this but non work on my Jakarta instance.
Any idea how I can get this?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2018 02:00 PM
Ok. Looks like it works in Service portal but not on IT.
The other option is
var comp = g_form.getReference('company', getCompany);
function getCompany(comp){
alert(comp.name);
}
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2018 01:46 PM
Did you try g_form.getDisplayBox('company')
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2018 01:50 PM
onChange script error: TypeError: g_form.DisplayBox is not a function function

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2018 01:50 PM
Sorry it is g_form.getDisplayBox('company').value
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2018 01:54 PM
same error