Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Relationships are missing from /EntityDefinitions & /RelationshipDefinitions

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi,

I am working on MS Dynamics CRM integration project. As per documentation https://msdn.microsoft.com/en-us/library/mt607522.aspx the metadata can be retrieved by below 2 endpoints:

1. /$metadata  (This will return EDMX file - CSDL)

2. /EntityDefinitions & /RelationshipDefinitions (This will return metadata and their relationship in JSON format)

But while analysing both the metadata i.e. EDMX and JSON I found that some relationships are missing from JSON (endpoint #2), please have a look on below example of Account-Opportunity:

Relationships for Account & Opportunity in EDMX:

Account
<NavigationProperty Name="opportunity_customer_accounts" Type="Collection(mscrm.opportunity)" Partner="customerid_account" />
Opportunity
<NavigationProperty Name="customerid_account" Type="mscrm.account" Nullable="false" Partner="opportunity_customer_accounts">
<ReferentialConstraint Property="_customerid_value" ReferencedProperty="accountid" />
</NavigationProperty>

Relationships for Account & Opportunity in /EntityDefinitions & /RelationshipDefinitions :

Account
{
"ReferencedAttribute":"accountid","ReferencedEntity":"account","ReferencingAttribute":"customerid","ReferencingEntity":"opportunity",
"SchemaName":"opportunity_customer_accounts","SecurityTypes":"Append","IsManaged":true,"RelationshipType":"OneToManyRelationship"
}
Opportunity
Missing customerid_account in /EntityDefinitions and in RelationshipDefinitions 

As per my understanding, all the relations are present in EDMX metadata file but some field relations are in  JSON metadata. for example, customerid_account is missing in Opportunity JSON metadata.

Thanks.

*This post is locked for comments

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans