Using Sub-Grids in Microsoft Dynamics CRM 2011

Roshan Mehta, 07 October 2010

I have been using Microsoft Dynamics CRM 2011 for only two days now and man do I love it! The customization features have improved so much that I can’t wait to start using it full time. One thing I particularly like is the new sub-grid feature which can be added to any entity form.

Now what is a sub-grid exactly? A sub-grid allows you to add an associated view to an entity form. In Dynamics CRM 4.0, this kind of feature would be classified as an “advanced customization” and could potentially be “unsupported”. It involves creating an iFrame on an entity form and adding some custom JavaScript to it. For an example of this feature in Dynamics CRM 4.0, please visit http://www.magnetism.co.nz/blog/simon/10-08-03/How_to_make_history_appear_on_an_entity.aspx

The built-in customization tools in Microsoft Dynamics CRM 2011 make this functionality so easy that even a baby could achieve such a task. No iFrames or custom JavaScript programming is necessary! Here is an example on how to use a sub-grid using a custom entity called Charter Request. I have decided to use the Account entity to hold the sub-grid and display all active Charter Requests for the selected Account. Note: There must be a 1:N relationship between Account and Charter Request.

Navigate to Settings -> Customizations and click on Customize the System.

Using Sub-Grids in Microsoft Dynamics CRM 2011

Select the entity which will house the sub-grid. Click on Forms and open up the main Account form.

Using Sub-Grids in Microsoft Dynamics CRM 2011 

Once inside the Account form, click on Insert and add a one-column tab to the form. I have used the following properties:

 sing Sub-Grids in Microsoft Dynamics CRM 2011

Click OK and save and publish the customizations.

That’s all there is to it! It’s crazy how easy it is! No iFrames, no custom JavaScript, no worries! Here is the final result.

Using Sub-Grids in Microsoft Dynamics CRM 2011 Frosty Stevens