This project is read-only.

Project Description (Dummy)

From Microsoft Dynamics CRM 2015 Hierarchical Visualizations allows the end user to visualize and interact with hierarchical data in an intuitive and visual fashion across both the web and the tablet.

This is great feature where User can visualize Hierarchy. However it would have been better to apply same hierarchy functionality for Child entities of Entity on which Hierarchy is set up. For example Account has Hierarchy settings where Parent Account is lookup on Account entity. Account has one to many relationship with Cases, Opportunities, Contact etc. So User would like to see the all the Cases which are created “Under” the particular Account. Here phrase “Under” means all the Cases for particular Account and all the Cases for the Account Under this Account.

Currently CRM does have this feature available but in very limited way that too only for Account entity (Correct me if I am wrong here).

My managed solution address this problem and with few Click and Point settings (no coding involved) CRM Customizer can set up the Sub-Grid view on Parent Entity form to show all the Children that comes “Under” the parent Entity record

Step 1 : Import managed solution in your CRM Organization

Step 2 : Configure Entity Relationships for Hierarchy Rollup

  1. Open the imported solution and go to Configuration section, it will render HTML Web Resource as shown below.
  2. image
  3. Enter value for “Hierarchy Custom Field Prefix”. Make sure that the value for “Hierarchy Custom Field Prefix” should be same as the prefix that you use for create new attribute on CRM Entity. Click on “Generate Config” button. It will render the table as shown below
  4. image
  5. This is what I called as GenericHierarchyRolloupConfigXML, it basically stores entity-relationship wise configuration in XML format in WebResource. This UI only transforms the XML into HTML table.
  6. Here as per your requirement select which entity-relationship you wanted to configure for enabling Hierarchy Rollup. For example as mentioned above if you want to show all Cases “Under” Account then select the row # 23 in above table.
  7. Finally click on “Update Config” button.
  8. Later on if you want to make changes to the Config setting come to same page and it will persist the changes you made last time and show up in UI.
  9. In case there are new relationships are added to the CRM after you made changes to Config, you can refresh the config by selecting “Refersh Config” check box and clicking on “Update Config”.

Step 3 : CRM View Customization.

  1. Once Step 2 is completed, based on what you have enabled you need to add one Custom Attribute (type string) to the Child Entity. Name of the Custom attribute should be “isretrievehierarchy“ (excluding the prefix). For example in above example add a new Custom field to Case Entity can be (mkisv_isretrievehierarchy). This custom field should have exact same prefix that you have mentioned in Step 2. Display name of this custom field can be . (Dot) so that it would not be easily visible on views.
  2. Add the newly added custom field to the Child Entity view. On Child Entity views you can either create a new View just to show all the Cases under hierarchy or update existing view which gets shown in Account form.  Although it does not matter where you place this field on view but its good idea to keep it at the last with minimum column width.
  3. Note that only the views which has this Custom Field will show the Cases “Under” Account

Step 4 : Plugin – Registering new Step/s

  1. Open the Plugin registration tool and go to the “Generic.Hierarchy.Rollup.Plugins”, this plugin in part of Managed solution that you have imported in Step 1
  2. image
  3. Now register new Step for the Child Entity as shown below. Note that Primary Entity should be the name of Child Entity (which in this case is Incident (Case)).
  4. image
  5. Add the Plugin Steps for each of the entity that you have configured in Step 2. That’s it setting part is done.


Now whenever the Parent Entity form is loaded and if it has Child Entity Sub-Grid with Views which has custom attribute GenericHierarchyAction added to it, it will start showing up all the records “Under” the Parent Entity.

Last edited Jun 1, 2016 at 1:24 AM by makarand_keer, version 3