#CRMVisualSchema – part 5: Launch of the plug-in for XrmToolBox

Almost 2 months after I started this series of articles, I’m proud to announce that the 1.0 version of the Entity Relation Diagram Creator plug-in is downloadable through the XrmToolBox Plugin Store.


The purpose of the Entity Relation Diagram Creator plug-in is to create a visual image representing an Entity Relation Diagram. The image can be used within your architectural, technical, functional and user documentation.


How to use…

After you launch the plug-in, you have to load the solutions that are present in your CRM environment. Once a solution is selected you can specify how you want to render the Entity Relation Diagram. This depends on the audience you are targetting.

Render options

In the “Fields to show”, you specify what fields of the entities in the solution you want to show. When you choose to show “Custom fields from publisher”, only the fields of the publisher (prefix) will be shown.

When you choose to show “Custom fields from all publishers”, then you will see all custom fields present in the entities.

When you choose to show “All Fields”, all fields (including the system fields) will be shown. That list can be really long.

Furthermore you can specify if you want the entities to appear as collapsed or expanded entities. In the rendered diagram you can choose to expand or collapse entities.


Dependent on the target audience you can choose to show or hide field data types and choose if you want to use display names (friendly names) for both entities and fields.


Regarding to relationships you can specify if you want to see the fields on which the relationships are based and in the case of many-to-many relationships the name of the relationship.

Relation names

Once the options are set you can click the green button to render the diagram. At this moment I render the entities in a grid.
The fun part for you is to rearrange the way I rendered the entities. You can do this by selecting an entity(the entity will be highlighted), or by selecting a relationship.


Once the entities are located correctly, you can either choose to save the diagram or you can take an image of the diagram.
Diagrams that are saved, can be used afterwards (by opening, altering and saving under a different name).


Rendering images

When you take an image of the diagram, the crossing relationships lines are altered automatically to show a bump in the horizontal line at the location where a vertical line crosses a horizontal one.


Future ideas

Right now I’m thinking of ways to improve the plug-in. I already have some ideas on improving the algorythm I use to render the diagram. Right now I render the entities on a first come first serve basis.

In a next version I’ll activly looking for hotspots in the entity schema and organize the entities around the hotspots. Besided that I want to improve the position of the relationship identifiers.

Furthermore I want to add some additional options, e.g. the option to show hidden solutions as well. As well as the option to draw relationships with entities that are not within the solution. That way dependencies between solutions become more clear.

For now I hope you’ll enjoy this plug-in. Please feel free to send me comments, remarks, compliments and/or suggestions. I need your feedback to improve the functionality.


23 thoughts on “#CRMVisualSchema – part 5: Launch of the plug-in for XrmToolBox

  1. Jonas Rapp says:

    Hi – great tool!

    A few initial comments 🙂

    It would be nice if attributes were originally sorted according to some fules, e.g:
    1. PK
    2. Alternate keys, alphabetically
    3. Lookups, alphabetically
    4. Other, alphabetically

    And the possibility to manually rearrange the order of attributes.

    Also attributes of type “Virtual” should always be excluded.

  2. Henk van Boeijen says:

    Nice piece of work, Bas!

    Gr. Henk

  3. Wynand Engelbrecht says:

    Hi Bas.

    Good tool but I keep getting a timeout error when generating the ERD. Is there a way to extend the time out? I’m looking to pull the ERD out of the Field Services solution.


  4. Emir says:

    Hi Bas,

    Great work! This tool will fill a very important hole in the Dynamics CRM World 🙂

    I have a problem that I also had with the Entity Diagram Generator in the SDK

    When you set “RetrieveAsIfPublished = true” during your MetaDataRequest I get an Unhandled Exception: “Found an integer attribute with unrecognized format: …”

    Solution is this;
    RetrieveAllEntitiesRequest request = new RetrieveAllEntitiesRequest() {

    RetrieveAsIfPublished = false,

    I would understand if you don’t want to default this to false, but for example maybe you can add a checkbox to the form to set this.

    Thanks in advance,
    Keep up the good work

    • Hi Emir,

      I’ll add this option; I’m already thinking of adding an advanced settings panel. e.g. show hidden solutions
      At this moment I do a RetrievedAsIfPublished = true.


      • Emir says:

        Hi Bas,

        Thanks for adding this, it is working for me now, great!

        As your loyal tester, I would like to point out that I noticed the 1-N relationships are shown “reverse” in the diagrams.

        For example in your sample diagrams above; Appointment -regarding- Contact. The diagram looks like as if 1 Appointment can have Multiple regarding Contacts.

        so not like this 🙂 https://goo.gl/CnNm6Y

        Many thanks again!

        • Wow, did I miss that one?

          • Reyko says:

            Hi Bas

            Based on this i’ve updated my tool to Version 1.4.0.

            This (“Bug”) is already there.
            I found this in the Relationship between PriceList and PriceListItem.

            Do you know when you change this?

            But in Total this is very helpful to document something.
            Nice Work

        • Simon Hetzel says:

          Yes I’ve noticed this also. The right field names are at the end of the relationships but the crowsfoot notation is at the wrong end of the line.

          Also it would be helpful if crossing relationship lines had a hoop in one of them (like Visio can) so it was clear they were not joined at this point.

  5. Tom Northrup says:

    This is awesome that generator in the SDK was not as flexible. Is this on github if we want to contribute?

  6. Dibutil says:

    Is there any way to convert ERD to Visio?

  7. Rob Pike says:

    Really appreciate an alternative to the SDK tool. Nice work.

    One idea for future development would be to provide a way to save the file in a Visio format.

    Thank you again,

  8. Russell Dunwoody says:

    Hi Bas,

    This is a really useful tool – Thank you for creating it.

    What is the best way to report bugs ? one being – I see the relationship lines reversed (crows feet at the wrong end) which someone else has pointed out already.

    .. If you haven’t got enough to do, I’ve got a handful of feature suggestions :

    – a very basic text filter box for the entity selection list, would be super handy.
    – have the entities remember their position when you hit generate again.
    – be able to add missing entities without recreating the entire diagram.

    again, cant thank you enough – this is a great bit of work.

    All the best,

  9. Any chance you can also release a standalone (v9 and v8.2 enabled) version for those people that do not have access to Visual Studio?

  10. Nancy says:

    This tool is great! I love how easy it is to move the entities around, and shift where the relationship endpoints and lines are shown. There is one challenge I’m running into, and I’m not sure if it’s something I’m doing wrong. On first creation, the entities look different than they do if I save and re-open. For instance, on first creation, the primary key shows with a golden key icon, the other keys show with silver keys, and the data types show after the field names. If I save and re-open the ERD, all of the key icons are gone, as are the data types; only the field names show, and they all have the same icon as the regular data fields. Does anyone have any suggestions for how to retain the formatting upon re-open? Thanks!

  11. John Savana says:

    How do we open and or edit ERD files?
    Wich programs can we use?

    Thanks for the support.

  12. Nick says:

    Awesome tool. I was looking for something exactly like this for my technical documentation for a Dynamics 365 CRM application.

Leave a Reply

Your email address will not be published. Required fields are marked *