How To: Create Dynamics 365 Entity Relationship Diagram

What is the MetaDiagram Utility?

When applying customisations to an existing Dynamics CRM environment, an understanding of the existing customisations is crucial.

Manually mapping out complex relationships between custom entities can be a painful and time consuming affair.

Dynamics 365 logo

Unfortunately Microsoft doesn’t provide an out-of-the-box tool built into Dynamics 365…. However they have included a nifty little tool in the CRM SDK called MetaDiagramConsole.exe which allows you to generate Visio diagrams of entity relationship mappings.

How does it work?

  1. Download and extract the Microsoft CRM SDK 
  2. Open and build the Visual Studio Solution. You can find it in SDK\SampleCode\CS\Metadata\Diagram. You’ll need to add the missing references to the CRM SDK DLL’s so that it compiles successfully.
  3. Run the compiled MetadataDiagram.exe application from the command prompt e.g. “MetadataDiagramConsole.exe new_myNewEntity”.
  4. The tool will connect to your specified Dynamics CRM environment, extract the metadata and generate a Visio (*.VSD) entity relationship diagram in your local directory.

Dynamics CRM Developer Resources

Dynamics CRM Metadata Diagram utility Screenshot

Dynamics CRM Entity Relationship Diagram

Final Thoughts

This tool has been super valuable for me, in particular when entering new client environments with little existing documentation (geez … thanks guys!).

You can find more information about it here

Hope you find it as useful as I have!

Shane Bartholomeusz

G’day, I’m a technical solutions consultant based in Perth, Australia that specialises in the Microsoft technology stack, including .NET, Dynamics 365, Azure and general web development etc.

This blog is my place to share my thoughts, helpful solutions and just random nerdy stuff.
Shane Bartholomeusz

Latest posts by Shane Bartholomeusz (see all)

Leave a Reply