The UML Diagram Generator for Microsoft Dataverse for Power Platform, Dynamics 365 is a tool in the XrmToolBox that generates Entity Relationship Diagrams in the form of PlantUML files from metadata in Microsoft Dataverse.
Release Notes
Click here toย see the latestย Release Notesย and all since 2020.
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.
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.
Load entities, and then you can start checking the entities, attributes and relationships you want to include in the model.
Try the Options button, to see how the generated file can be modeled.
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:
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.
You can also export the diagram as rendered visual files, just right-click and select Export Current Diagram.
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.
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 planttext.com 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 ๐
Term | Explanation |
---|---|
UML | Unified Modelling Language (wikipedia) |
PlantUML | Open source initiative standardizing textual representation of UML diagrams (wikipedia) |
ERD | Entity Relationship Diagram (wikipedia) |
D365 | Microsoft Dynamics 365 (or CRM for previous versions also supported) |
CDS | Common Data Service – renamed to Dataverse |
XrmToolBox | Application with 350+ open source-driven tools for the Microsoft Dataverse / Power Platform / Dynamics 365 / CRM / BC |
Latebound Constants Generator | A twin tool using the same code base and has the same UI, but generates constants in C# code. |
Does not work in XRM toolbox, missing assembly “Rappen.XTB.LCG.UDG.Common, version 1.2020.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,
Jonas
Restarting the app resolved the same error message for me.
Hi Jonas.
I am getting following error for last couple of days.
Any suggestion?
Thanks
Narayan
———
Error: 403 Forbidden
GET https://www.plantuml.com/plantuml/svg/0/…
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)
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.
Getting same exact error as Narayan on two separate machines (non-VPN). Has anyone been able to find a solution to the error?
Could you try just browsing to https://www.plantuml.com/plantuml/svg/
If that works (you will get a very small sample plantuml) does your browser have any proxy defined?
What does the colour coding represent against the entity selection list? (Great tool)
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.
Tempting to use the colour coding but I wonder if it will remain and go forward into the new UI.
Totally agree. Might not have been the most useful feature I have implemented…. ๐
HI I am getting same error
Error: 403 Forbidden
GET https://www.plantuml.com/plantum/svg/0/…
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 https://www.plantuml.com/plantuml/svg/ it works please see image below
My best guess is that the service from plantuml.com has been changed in some way since this article was written… ๐
Have you tried reaching out on that site?
For some reason the unsecured version of the site works. I changed HTTPS to HTTP for the Server URL and it worked.
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 ๐
Hello, Does the ERD tool work for D365 F&O. Thanks.
Thanks! ๐
I didn’t know, but great to hear that you use my tool with F&O.
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.
Regards!
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…)
Jonas
Hi everyone. I was receiving the error below when I was using VSCode to generate the UML:
Error: certificate has expired
To solve it I’ve just change https://www.plantuml.com/plantuml to http://www.plantuml.com/plantuml and worked
Hi, is it possible to export the UML from XRM as an XML file?
Sorry no, it’s based on PlantUML.
Still having the formbidden problem. It happens when the file is large, I estimate 14000 character limit.
Is there any alternative way?
Thanks
Yazan Ghafir
Unfortunately I don’t have a solution to that… ๐