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

timmyweytjens
Tera Expert

Can you put the URL you use for your SOAP queries? I have used #2 on our instances and it worked as expected


Hmm, that should work, in your response you should see things like


              <assignment_group/>
              <dv_assignment_group/>