Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Inconsistency in ODATA Across 365 Environments

Posted on by Microsoft Employee

We're seeing a strange and inconsistent behavior in two of our Dynamics 365 testing environments with regard to the ODATA endpoints of each environment.  We installed the same solutions in both environments but are seeing an identical query gives an error in one environment but is working in the other.

In the query below, pafo_questionnaireresponses is an entity, which has a lookup field on it with schema name pafo_applicationId.

https://<sandbox>.crm.dynamics.com/api/data/v8.1/pafo_questionnaireresponses?$select=pafo_foid&$expand=pafo_applicationId($select=pafo_name)

We have two different <sandbox> environments, lets call them SB1 and SB2.

In SB1, the query gives us an error:

"Could not find a property named 'pafo_applicationId' on type 'Microsoft.Dynamics.CRM.pafo_questionnaireresponse'."

But if we change the expand to be all lowercase, so that it reads $expand=pafo_applicationid, the query works and returns results.

Meanwhile in SB2 the original query gives us results but if we change it to all lowercase here, we get this error:

"Could not find a property named 'pafo_applicationid' on type 'Microsoft.Dynamics.CRM.pafo_questionnaireresponse'."

I have confirmed that both environments' solutions are the same versions and if I look at the entity in the customizations the schema name is identical.

Looking at the CRM versions of the two environments:
SB1: Version 1612 (8.2.1.344) (DB 8.2.1.341) online
SB2: Version 1612 (8.2.1.344) (DB 8.2.1.344) online

Could the DB discrepancy be the cause of this issue?  Or is there some other intricacy of the ODATA endpoint that we are missing?

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Inconsistency in ODATA Across 365 Environments

    Thanks for the suggestion but we are seeing the same results with 8.2.  I am going to try opening a case with Microsoft support and hope they can provide some insight.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Inconsistency in ODATA Across 365 Environments

    Hmmmm, that is a strange issue then.The DB version 'could' be the problem, but you'd need to contact Microsoft support to confirm.

    Might be silly, but have you tried the 8.2 endpoint to see if that works?

    https://<sandbox>.crm.dynamics.com/api/data/v8.2/pafo_questionnaireresponses?$select=pafo_foid&$expand=pafo_applicationId($select=pafo_name)

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Inconsistency in ODATA Across 365 Environments

    The pafo_questionnaireresponse entity originates from a solution from another environment.  I have confirmed that both environments are on the same version of the solution and that the entity in both environments has identical information for this field including schema name.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Inconsistency in ODATA Across 365 Environments

    Question:  Did you create the entity pafo_questionnaireresponse separately in each environment? In other words did you go into customization's, create the entity, add fields in each one?

    OR did you create it in one environment, save it to a solution, export the solution and then import that solution to the other environment?

    It seems like the issue with casing (Id versus id) is a result of trying to create them separately.  Looks like there was inconsistency in the SDK field names between the 2?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans