How to get the table name of a reference field in client script without using GlideAjax?

Sachin Sarawgi
ServiceNow Employee
ServiceNow Employee

I have a form in which there is a column of Field Name type. The field name can be of String type or reference type. When a user selects a reference type field from the dropdown I wanted to get the table name (without using GlideAjax).

1 REPLY 1

Ahmmed Ali
Mega Sage

You can use g_form.getDisplayBox().value to read display name of reference field.

 

For example on incident form,

var user = g_form.getDisplayBox("caller_id").value will give you name of the caller.

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali