Get the value of reference field using glideajax

SNow35
Giga Guru

How to get the display value of reference field in script include and use it in client script. I have done it using getdisplaybox but it is not supported or throws an error in some places, hence would like to do it through glideajax.

Thanks in advance.

7 REPLIES 7

Omkar Mone
Mega Sage

Hi 

You can pass the sys_id to script include and get the display value by Gliding the table for which the sys_id is.

Refer this thread for async GlideAjax  -https://docs.servicenow.com/bundle/geneva-servicenow-platform/page/script/server_scripting/reference...

Regards

Omkar Mone

This thread might be something you're looking for - 

https://community.servicenow.com/community?id=community_blog&sys_id=f8ccee25dbd0dbc01dcaf3231f961978

 

Regards

Omkar Mone

AbhishekGardade
Giga Sage

Hello SNow,

Have you tried with getDisplayBox('field_name').value ?

For GlideAjax and client script code:

https://community.servicenow.com/community?id=community_article&sys_id=9f7ce2e1dbd0dbc01dcaf3231f961...

https://docs.servicenow.com/bundle/geneva-servicenow-platform/page/script/server_scripting/reference...

Please mark as Correct Answer and Helpful, if applicable.
Thanks!
Abhishek Gardade
Hexaware Technologies

Thank you,
Abhishek Gardade