Retrieve lookup values using API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2012 01:41 AM
How can I get Lookup type field values??
For Example:Incident has a field named Incident State.The values which we can select are New,Active,Awaiting Problem etc.My question is how to retrieve these values using API ???
Thanks
Sandip
- Labels:
-
Integrations
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2012 11:57 AM
The API will require the actual values instead of the display/pretty values.
To get this manually, as an administrator, you right click on the field in the form and click on "Show Choice List".
This will show the list of choices with their actual database value as well as their display value. Use the values in the "value" column for the API:
If you are looking for something programmatic to do this, you will need to make a separate call to the sys_choice table and query on the table and the label to get the value. However, I would recommend just coding in the value into your script rather than make another SOAP call to get the value.