locked
CRM 2013 - Where or How Are Entity Relationships Stored? RRS feed

  • Question

  • Hi there, apologies in advance for a novice question:

    > Where or how are entity relationships stored in CRM 2013?  Are they simply maintained within the Solution/Customizations xml files?  Or are they stored in an actual SQL database table?  For example, if a Hotel entity has 1:N relationships to the Employee, Room, and Facility entities, where is that listing stored?

    Thank you so much in advance!

    Friday, February 5, 2016 2:17 AM

Answers

  • Hi,
    CRM relationships are stored in the database.


    Consider a 1: N relationship (Account to Opportunity).Here one Account can have many Opportunities.if you go to Customization

    and Open 1:N relationship (opportunity_customer_accounts).You can see the Name of Lookup field "customerid".

    "customerid"  field is used in child entity(here opportunity) to establish relationship .Now Open CRM Databse run this query.

    select top 10 customerid,CustomerIdName from Opportunitybase.

    This will display the  Accountid and Account Name of top 10 Opportunities.


    For N:N relationship CRM creates an Intersect Entity and Put fields from both the entities used in N:N relationship.

    Hope this helps.


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Thanks and Regards, Mohammad Yusuf Ansari http://microxrm.blogspot.in



    Friday, February 5, 2016 6:10 AM

All replies

  • Hi,
    CRM relationships are stored in the database.


    Consider a 1: N relationship (Account to Opportunity).Here one Account can have many Opportunities.if you go to Customization

    and Open 1:N relationship (opportunity_customer_accounts).You can see the Name of Lookup field "customerid".

    "customerid"  field is used in child entity(here opportunity) to establish relationship .Now Open CRM Databse run this query.

    select top 10 customerid,CustomerIdName from Opportunitybase.

    This will display the  Accountid and Account Name of top 10 Opportunities.


    For N:N relationship CRM creates an Intersect Entity and Put fields from both the entities used in N:N relationship.

    Hope this helps.


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Thanks and Regards, Mohammad Yusuf Ansari http://microxrm.blogspot.in



    Friday, February 5, 2016 6:10 AM
  • Thank you so much this is a very helpful answer, much appreciated.
    Friday, February 5, 2016 6:45 AM