CRM 2015/2013 ER Diagram Generator Tool

Many of us have the need to document ER Diagrams (Entity Relationship Diagrams) as a part of our MS Dynamics CRM implementation.
Creating these ER Diagrams is one part, and formatting, color coding etc. these diagrams is another which thereby increases the documentation time as well. Sometimes this activity can be erroneous as well as we need to open each and every entity customization, browse through all the 1:N, N:1 and N:N relationships and then put them in the diagram as well.

So, here is the tool which would take care of all the above activities. The tool is simple to use and gives Sure Step color coded ER diagrams using MS Visio as the one shown below.


This tool is simple to use and gives Sure Step color coded ER diagrams using MS Visio. Here is the tool can be downloaded from CodePlex and below are the steps for using this tool.

Download the tool from here

Step 1: Once you unzip the solution. The tool can be run by clicking the “XRMERDiagGenerator.exe” file.


Step 2: After the tool comes up, you would have to connect it to a CRM organization by clicking “Sign in to CRM”. At this point you would get a pop-up to connect to a MS Dynamics CRM On-premise/ Online environment. This control would be familiar to most of us working with MS Dynamics CRM. Once a connection is made, you would be able to select and connect to your desired Organization.


Step 3: You would get a screen as below showing your connection information and suggesting to click the “Get All Entities” button. Now at this time, the tool would be fetching all the entities present in your selected organization so that its easy for you to select your required entity/entities and generate ER Diagrams for them.

Since a Metadata call is a costly operation in CRM, this operation would take sometime approx. 5-10 minutes.


Step 4: Once the List of entities are load, you can sort them by clicking the “Entity Schema Name” header. You can select all the entities or undo your selection by clicking the “ Select All” and “Select None” buttons. You can also select one or multiple entities by using the “Ctrl” key while selecting the entity rows.


Step 5: Now click “Generate Visio”, to generate the ER Diagram for the selected entity/ entities in MS Visio.


The “.vsd” file would be generated in the tool’s directory itself. Here is one sample ER diagram as created in MS Visio by this tool.


Pre-requisites for the tool:

1. You should have MS Visio installed in the system where the tool is running. Link for downloading a trial version for downloading MS Visio 2013 is here.

2. You should have .Net Framework 4.5 installed on your system. Although I haven’t checked out my tool on a system that doesn’t have .Net Framework 4.5 installed, but I think it should be there for my tool to run successfully. Link for downloading .Net Framework 4.5

3. You should also have Windows Identity Foundation installed and enabled in your system. Link for downloading Windows Identity Foundation.

Color coding for the Entities is as follows:

1. If the attribute is a primary key for the entity, then “[PK]” would be appended to the attribute.

2. A Business owned entity would be colored “Orange

3. An Organization owned entity would be colored “Green”.

4. A User/Team owned entity would be colored “Blue

5. If the entity does not fall into any of the above categories then would be colored “White”.



  1. Bohnnie, this is a great tool. I was struggling with the one in the SDK and trying to adjust myself. However, I get the same issue with the TimeOut. If there is a lot of entities the timeout is exceeded using your tool, or the one in the kit. I found out we cannot extend the timeout for a user but the call to the service should bypass this timeout or allow us to extend somehow.

    Do you have any insight on that? I saw on codeplex someone mentioned extending the proxy timeout. You are doing great work here. Thank you so very much for sharing.

    1. Hi there,
      Yes it does as I have been using this with Visio 2016. It might take a bit longer if you have selected all the entities. I am also coming up with a new version for D365 on this. Will keep you posted about it!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s