Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamics 365 CRM - Retrieve table definitions by name (Optionset) using oData CRM Api v8.2 giving error #917

Open
sbpatil1975 opened this issue Dec 21, 2023 · 0 comments

Comments

@sbpatil1975
Copy link

Hi Vagif,

I am using Simple.OData.Client library (version 6.0.1) to fetch OptionSet data from Dynamics 365 api V8.2 using entity metadata id and attribute metatdata id. This approach worked correctly and I was able to retrieve the optionset data without any issue. Only this approach had to make 3 calls (get the metadata id first and then fire query for Optionset)

Another approach that MS suggested to use LogicalName rather MetadataId which would get the result in query as below

api/data/v8.2/EntityDefinitions(LogicalName='entityname')/Attributes(LogicalName='attributename')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?$select=LogicalName&$expand=OptionSet($select=Options),GlobalOptionSet($select=Options)

reference
https://learn.microsoft.com/en-us/power-apps/developer/data-platform/webapi/retrieve-metadata-name-metadataid#retrieve-definition-items-by-name

This approach gives output exactly same as Metadataid but while parsing the the response from Simple.OData.Client it is giving error

image

when I debug code at Simple.OData.Client it found that below code is breaking while reading the response

image

Please let me know how it can fixed, your help really appreciated

Regards,
Sanjay Patil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant