Sunday, February 26, 2012

Reload CRM 2011 sub-grid manually

Recently I wanted to add a subgrid to the one of my CRM form. It's a simple thing you just want to follow the normal procedure.

1. Settings - Customizations - Customize the System

2. Open the entity form and go to the Insert tab and click on Sub-Grid button

3. Now give a name for "Name" field then select Entity and Default View
ntity form and go to the Insert tab and click on Sub-Grid button

That's it. Save and publish the form.

Normally now all of the sub records should populate in the main form load. But in my case it didn't load the sub grid records, so just had to find a reason for that. actually in my main CRM form there were more than 10 sub grids. Finally I came to know that it will load only first 5 sub grids in the page load. So then we need to manually load my sub grid using javascript. It was not that much default you can simply use the following javascript code.

var grid = document.getElementById("SubGridName");
if (grid != null) {
if (grid.readyState == "complete") {


  1. This comment has been removed by a blog administrator.

  2. I am pretty new to form customizations in crm 2013.
    But basically when a subgrid is created it means that a + button gets created for the parent entity and when a user clicks + button the created subgrid has to pop up. Right?
    Please correct me if I am wrong. If so how can we achieve the same.


MS CRM 2011 KB Article customization Issue.

Recently I have encountered some issue while customizing Kb Article Entity. I was doing following configuration in Article form. 1. Add Ba...