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