Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 general forum

Error when trying to access remote database through OData v4

(0) ShareShare
ReportReport
Posted on by

hello,

What I have to do is a C# service to access a remote database through OData and put all query results into a datset. Simple enough,
I have done it a few times in the same project.The problem is, it doesn't work like all the other times. Instead, when looping
through the request enumerator, on first run it returns this error:

"!qLGpI!An ODataEntry of type 'Microsoft.Dynamics.DataEntities.ProductionParameter' is found without key properties. When writing without a user model, each entry must contain at least one property whose 'ODataProperty.SerializationInfo.PropertyKind' set to 'ODataPropertyKind.Key'. When writing with a user model, the entity type 'Microsoft.Dynamics.DataEntities.ProductionParameter' defined in the model must define at least one key property. Ploc Ploc Ploc Ploc Ploc Ploc Ploc !"


the error originates in "Microsoft.OData.Core"

For generating and ruynning queries, I use the Microsoft OData package on Github: https://github.com/Microsoft/Dynamics-AX-Integration/tree/master/ServiceSamples

Categories:
  • Community Member Profile Picture
    on at
    RE: Error when trying to access remote database through OData v4

    yes, it generates the classes from the metadata stream

  • Suggested answer
    Sukrut Parab Profile Picture
    71,687 Moderator on at
    RE: Error when trying to access remote database through OData v4

    did you use the OData v4 Client Code Generator in your Visual Studio application to build the OData entity proxy classes ?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Dynamics 365 general forum

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans