问题
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:
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
来源:https://stackoverflow.com/questions/51994419/find-picklist-values-in-dynamics-via-the-web-api