Featured Post

Dynamics 365 - Business Process Flow and Things to take note before you upgrade into Dynamics 365.

In 2 months ago, my company decided to upgrade the Dynamics CRM 2016 into Dynamics 365 and there is something different about Dynamics 365 B...

Wednesday, January 3, 2018

Dynamics 365 : Get Entity Relationship using SQL Query

Recently, i got informed by my client, they need to do some clean up for the relationship between entities.

Thus, I have to generate the excel file and show to my client but as we all know there is no out of box feature to generate the relationship excel file. So, there are few ways to generate it.

  1. Third party tool
    - XRM Tool Box
    - I don't want to rely on Third party tool.
  2. Manually copy the relationship
    - Time consuming and sounds ridiculous.
Thus I decided to generate the relationship using SQL Query .

DEMO
  1. Open up The SQL management studio.
  2. Download the script from HERE.
  3. Copy and paste the script.
  4. Change the Entity Logical Name to suit your need.

RESULT



Save the result as CSV file.



I hope this will save your some time when it is your turn. Happy 365-ing.

No comments:

Post a Comment