Getting Picklist values from D365 OData Metadata API

Ben Smith 21 Reputation points
2021-03-25T20:48:11.717+00:00

Hello Q&A Forum,

I have a question about the Dynamics 365 metadata API. We are trying to get values from a Picklist attribute of a Dynamics 365 Entity. For example when we describe the attributes of an Account using the following URL

https://{D365-instance}/api/data/v9.0/EntityDefinitions(LogicalName='account')/Attributes

We see that one 'Account' attribute 'ShippingMethodCode' is a PickList type, and when we look in our Dynamics 365 we see that the dropdown for Shipping Method has DHL, FedEx, Will Call, etc. What we are looking for is an API that will retrieve the possible values to Picklist type attributes. Here is one URL we have tried so far

https://{D365-instance}/api/data/v9.0/EntityDefinitions(LogicalName='account')/Attributes(LogicalName='shippingmethodcode')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?$select=LogicalName&$expand=GlobalOptionSet($select=Options)

This API gave us some options but didn't line up with the options that we saw on the dynamics UI.

Let me know if you require any more, background on our problem

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
23,913 questions
No comments
{count} votes

Accepted answer
  1. Dave Patrick 329.9K Reputation points Microsoft MVP
    2021-03-25T20:49:31.527+00:00

    Dynamics 365 is not currently supported here on QnA. The product group for Dynamics actively monitors questions over at
    https://community.dynamics.com/f

    --please don't forget to Accept as answer if the reply is helpful--

    No comments

1 additional answer

Sort by: Most helpful
  1. Ben Smith 21 Reputation points
    2021-03-26T14:38:50.87+00:00

    @Dave Patrick thank you for the quick response and redirect.

    For anyone who found this question via a search engine here is the link to the question over at the forum mentioned above

    getting-picklist-values-from-d365-odata-metadata-api

    No comments