Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

Cannot find the tables relationships

Posted on by Microsoft Employee

I have the Dynamics 365 SQL database. I want to find the relationship between AccountBase / ContactBase and ActivityPointerBase / other Base. I don't seem to find the IDs that can join. Is there documents that contains the joins? 

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Cannot find the tables relationships

    I found the joins by opening many view to find the joins. There are hundreds views. The AccountId in AccountBase table named different in Activity tables. It made it difficult. It took me a long time to find out. Thank you very for your help.

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Cannot find the tables relationships

    Ohh, if you just have the DB then you have to manually check the relationship under the the individual entities. I don't have access to db as of now so not exactly sure but if I am not wrong, it will be under foreign key.

    As an alternate, if you just want to know the out of box relationship. Then you can download the relevant crm version sdk which has the EntityMetadata excel file.

    https://msdn.microsoft.com/en-us/library/gg309396.aspx#bkmk_EntityMetadata

    You can download the sdk here-https://www.microsoft.com/en-au/download/details.aspx?id=50032

    Hope this helps.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Cannot find the tables relationships

    Ravi, how don't I get the metadata diagram tool. I don't have access to the CRM. I only have the client SQL Database that was provided by Microsoft.

  • Suggested answer
    Mahendar Pal Profile Picture
    Mahendar Pal 45,095 on at
    RE: Cannot find the tables relationships

    You can use ER diagram to see how these entities are related, you can use xrmtoolbox www.xrmtoolbox.com/.../JourneyIntoCRM.XrmToolbox.ERDPlugin

    Apart from that you can see all the relation ships from the default solution by navigating to individual entities ->relationships

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Cannot find the tables relationships

    You don't need to install SDK to just cehck the relationship. Did you try this etting>> Customization >> Customize the System >> {Select your entity} >> click on 1:N or N:1 and N:N. Fo 1:N or N:1?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Cannot find the tables relationships

    Need some more help. What SDK do I have to install? Thanks.

  • Suggested answer
    RaviKashyap Profile Picture
    RaviKashyap 55,410 on at
    RE: Cannot find the tables relationships

    Hi,

    You would need to check the relationship of the specifc entities i.e. how the 2 entities are linked (1:N, N:1 or N;N) from the customization. Setting>> Customization >> Customize the System >> {Select your entity} >> click on 1:N or N:1 and N:N. Fo 1:N or N:1, you will find the schema name in the relationshio which will exists in either of the entity. For N:N, you will find the schema name under the relationship which would be a table in itself.

    Hope it helps.

  • Suggested answer
    Adrian Begovich Profile Picture
    Adrian Begovich 21,009 Super User 2024 Season 2 on at
    RE: Cannot find the tables relationships

    Hi danyeungw,

    You can use the metadata diagram tool to build entity diagrams. The generated entity diagrams show the relationships between entities and includes the names of id fields.

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

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans