Skip to main content
edited tags; edited title
Link

Get optionset text from OData query in CRM web api

Source Link
JensB
  • 6.8k
  • 2
  • 60
  • 103

Get optionset text from OData query in CRM

https://example.com/crm/api/data/v8.2/accounts?$select=custom_optionset

The above query selects all values in an optionset field in CRM. The return data looks something like this:

{
    {
        "@odata.etag":"W/\"112607639\"","custom_optionset":285960000,"accountid":"a08f0bd1-e2c4-e111-8c9a-00155d0aa573"
    },
    {
        "@odata.etag":"W/\"112615384\"","custom_optionset":285960010,"accountid":"a18f0bd1-e2c4-e111-8c9a-00155d0aa573"
    }
}

I don't want the value of the optionset. I want the associated text label. How do I get this?