Monday, July 25, 2011

Auto Refresh of Grids on form , while loading, ms cmr 2011

In MS CRM 2011, we got a very good feature as of adding the inline grid on form with easily.
So, while loading sometimes it will not load the records automatically, but will give a hyperlink saying ckilc here to laod the records.
If you want to load it automatically(cuz some crazy users do't want another click to load), just get the name of that grid, by double clicking the grid in the design view of the form.
then onload of the form call the below function by passing the name of that grid.

function _loadGridAutomatically(_gridName){
if(document.getElementById(_gridName) != null){ //make sure the grid is there
_gridName.Refresh(); // this will do d magic
}
}

hope this will help to the developer for such crazy(lazy) users....

No comments:

Post a Comment