UML Diagram Generator for Microsoft Dynamics 365

UML Diagram Generator for XrmToolBox

The UML Diagram Generator for Microsoft Dynamics 365 is a tool in the XrmToolBox that generates Entity Relationship Diagrams in the form of PlantUML files from metadata in Microsoft Dynamics 365 and the Power Platform Common Data Service.

PlantUML basics πŸ”—

PlantUML is plain text. This means you can version control your models and you can edit the models by manually editing the PlantUML files.

It is possible to generate visual diagrams from PlantUML ‘code’. Supported formats are PNG, SVG, and even Ascii art text files.

Sample model rendered from PlantUML generated from Dynamics 365.
Sample model rendered from PlantUML generated from Dynamics 365. Click to enlarge.

The current version of UML Diagram Generator is not generating the actual visual model, that is handled by the PlantUML service or if you choose to set up your own PlantUML server. There are plans to include the generation, see issue #42 on GitHub.

Using the tool πŸ”—

Start the tool and connect to an environment.

Launching UML Diagram Generator in XrmToolBox

Load entities, and then you can start checking the entities, attributes and relationships you want to include in the model.

UML Diagram Generator for XrmToolBox
UML Diagram Generator for XrmToolBox. Click to enlarge.

Try the Options button, to see how the generated file can be modeled.

UML Diagram Generator options

When you are happy with the selections and options, hit the Generate button to create the PlantUML file.

Getting started with PlantUML πŸ”—

VS Code extension

The easiest way to get started after installing UML Diagram Generator for Microsoft Dynamics 365 is to install an extension to VS Code and view the files from there. My suggestion is to use the extension by jebbs from the Visual Studio Marketplace.

Extension configuration

In VS Code, go to File – Preferences – Settings.
Expand Extensions, and find the PlantUML configuration.

You only need to change/verify two settings: Render and Server:

PlantUML extension for VS Code settings.

The rest of the settings can be left with default values.

Now open the generated PlantUML file, and simply right-click and select Preview Current Diagram.

PlantUML in VS Code
PlantUML in VS Code

You can also export the diagram as rendered visual files, just right-click and select Export Current Diagram.

PlantUML output format

This will now prompt you to select which file format to generate. The prompt is popping up at the top of the VS Code window, if you’re not used to VS Code this is not always super clear.

PlantUML rendered files

The generated file will by default be placed in a folder under the PlantUML file named as the PlantUML file, and the file name will be the name of the @startuml tag, which is the same as the Title defined in the options in the tool.

In the above image:
..\CoolRappRockets\Model is the folder where the tool saved the generated file
Cool2 is the name of the generated file
Cool Rapp Rockets is the Title set in the options.

Online alternatives

There are also online services generating the model from the PlantUML code, try for example where you can past the code from your generated file.

Other options

There are lots and lots of options for generating visual models out there, have a look at the PlantUML webpage for a complete list.

Glossary πŸ”—

UMLUnified Modelling Language (wikipedia)
PlantUMLOpen source initiative standardizing textual representation of UML diagrams (wikipedia)
ERDEntity Relationship Diagram (wikipedia)
D365Microsoft Dynamics 365 (or CRM for previous versions also supported)
CDSCommon Data Service
XrmToolBoxApplication with 150+ open source driven tools for the Microsoft Dynamics 365 / CRM / CDS platforms

24 thoughts on “UML Diagram Generator for Microsoft Dynamics 365

  1. Does not work in XRM toolbox, missing assembly “Rappen.XTB.LCG.UDG.Common, version 1.2020.1.

    1. Hi Yanus,

      I have seen a few occasions where this error shows up after installation of the tool. Did you try restarting XrmToolBox and give it another shot?

      Best Regards,

  2. Hi Jonas.

    I am getting following error for last couple of days.
    Any suggestion?



    Error: 403 Forbidden

    at ClientRequest.closeCallback (c:\Users\PCNAME\.vscode\extensions\jebbs.plantuml-2.13.11\out\src\plantuml\renders\httpWrapper.js:77:27)
    at ClientRequest.emit (events.js:203:13)
    at TLSSocket.socketCloseListener (_http_client.js:358:9)
    at TLSSocket.emit (events.js:208:15)
    at net.js:588:12
    at TCP.done (_tls_wrap.js:479:7)

    1. Had a friend with this exact problem the other day, his issue was he was on a VPN connection that didn’t allow him to access the plantuml server. Could that be it?
      Rendering works fine for me.

  3. Getting same exact error as Narayan on two separate machines (non-VPN). Has anyone been able to find a solution to the error?

    1. It is the colors defined for each entity in the customizations.
      Didn’t know that existed?
      Well, it’s a very rarely used property…
      And I don’t think it’s available from the Maker portal, still only Classic Solution Explorer.
      Entity Color

  4. HI I am getting same error

    Error: 403 Forbidden

    at ClientRequest.closeCallback (c:\Users\NihilLimbadia.vscode\extensions\jebbs.plantuml-2.14.3\out\src\plantuml\renders\httpWrapper.js:77:27)
    at ClientRequest.emit (events.js:315:20)
    at TLSSocket.socketCloseListener (_http_client.js:385:9)
    at TLSSocket.emit (events.js:327:22)
    at net.js:674:12
    at TCP.done (_tls_wrap.js:567:7)

    I tried browsing it works please see image below

    1. My best guess is that the service from has been changed in some way since this article was written… πŸ˜•
      Have you tried reaching out on that site?

  5. The 403 I have got previously seems related to when you send too large a UML for the server to render. If sending that large you need to do locally I think is what they are saying. The 403 code though doesn’t really provide that insight.

    Useful generator Jonas, thanks πŸ™‚

  6. Hi. Great Tool! πŸ™‚

    Is there a clean way we can handle opening multiple instances of this tool without dragging the cached configurations of a previous instance along? i’m trying to build multiple UMLs of different apps for example.


    1. Hi, and thank 😊

      I think that if you create one and save that one, you can open a new one connected to a new environment, and then open the first one. Then you get all settings from the first one. Then you can delete all entities and start from fresh, but with the same settings.
      I believe that is what you need… (I may be wrong…)


  7. Hi, is it possible to export the UML from XRM as an XML file?

  8. Still having the formbidden problem. It happens when the file is large, I estimate 14000 character limit.

    Is there any alternative way?

    Yazan Ghafir

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.