5

I'm trying to determine how I can find the integer values for picklist fields in Dynamics via the web api. I can access the basic metadata by using:

GET https://[COMPANY].api.crm3.dynamics.com/api/data/v9.0//EntityDefinitions(LogicalName='lead')/Attributes/

but for picklist values I don't see the mapping of the integer value to the displayed string.

Is there a table that holds all of this or a way to expand this information on the above call?

1 Answer 1

7

You can use this to retrieve.

https://[COMPANY].api.crm3.dynamics.com/api/data/v9.0/EntityDefinitions(LogicalName='{Entity Name}')/Attributes(LogicalName='{OptionSet Name}')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?$select=LogicalName&$expand=GlobalOptionSet($select=Options)

Reference

2
  • Hello Arun, what is that ($select=option) in the end?
    – Hemang
    Commented Nov 5, 2020 at 12:41
  • @Hemang that will give the options in the select list Commented Nov 19, 2020 at 2:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.