Skip to content

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

@sbpatil1975

Description

@sbpatil1975

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions