GetLookupValue enables an application program to obtain the display value corresponding to a key value for the specified object columns. This API is used to retrieve the user friendly descriptions for specific code values when a package contains only the code value and the developer needs to display the user friendly description of the code in the user interface. This request is also useful when displaying an individual record.
The request contains a list of LookupFields. Each LookupField contains an identifier for the column and a foreign key value.
The response contains a record that has a field for each LookupField. The order of the fields matches the order of the LookupFields in the request. In each field, the name is the lookup (foreign key) value and the value is the lookup display name.
This request is intended to be used together with the GetLookupValues and SearchLookupValues requests. The difference between these APIs is that the GetLookupValue API retrieves descriptions only for the specified code values, while the GetLookupValuesRequest and the SearchLookupValuesRequest return the list of valid lookup code values and lookup code descriptions for the specified lookup column.
Use Case
This is the common scenario for using the GetLookupValue request:
Fetch the valid values for a particular field and display them in a UI
—In a custom UI, you can use GetLookupValue to fetch a list of valid values for a field. You can then display these values as a set of selections for the user.