displayvalue=true or displayvalue=all not working as described

wight
Giga Contributor

Direct Web Services - ServiceNow Wiki

Section 5 states:

When you query a record using a get or getRecords function the instance returns all fields associated with that record. The fields are often reference fields that contain a sys_id for a record on another table. Use one of these options if you want the display value for the field to be returned instead of the sys_id:  

1. Add the property glide.soap.return_displayValue to your system properties, and every SOAP request will return a display value for a reference field.
2. Add the parameter displayvalue=true to your SOAP request URL, and SOAP requests with that parameter will return a display value for a reference field as a string, instead of the sys_id. The SOAP URL would look as follows:

https://<instance name>.service-now.com/incident.do?displayvalue=true&SOAP

3. Add the parameter displayvalue=all to your SOAP request URL, and SOAP requests with that parameter will return a display value for a reference field, in addition to the sys_id. The response element name for the display value field will be prefixed with dv_ such as dv_caller_id.

When I try to utilize #2, connection fails.   When I use #3, no additional fields are shown...

What am I missing?

Do I need to utilize a view to make this work?   If so, how do I find the views available for a particular table?

Thanks!

-David

1 ACCEPTED SOLUTION

wight
Giga Contributor

OK,


Figured it out...   You ALSO have to specify the displayvalue=all on the WSDL URL...


View solution in original post

7 REPLIES 7

That is what I expected as well, but I did a dump of the response data using var_dump and no dv_* fields returned.   Is there something within SN that needs to be turned on to enable this?   We are currently on Eureka...   Will be migrating to Geneva soon...


wight
Giga Contributor

OK,


Figured it out...   You ALSO have to specify the displayvalue=all on the WSDL URL...


venkatiyer1
Giga Guru

sysparm_display_value works