I have 8 sub-grids on my Opportunity form which are part of sections not visible by default.
I have implemented JavaScript calls on form load to toggle the sections based on the selected value of an option-set.
The issue is that after using the system for some time, the grids stop populating the records and display a link stating "To load <Subgrid name> records, click here."
Nothing happens when I click the link & upon inspecting the element I found that the onclick event of the link simply returns false.
Below is the code from developer tools for the link in VehicleLookup subgrid.
<a id="LoadOnDemandMessage" class="ms-crm-List-LoadOnDemand" onclick="return false;">To load Vehicles records, click here.</a>
To fix the issue I tried to refresh the grids using JavaScript by executing the refresh() method of sub-grid control but I get an exception stating "Cannot read property 'refresh' of null".
I also removed all my JavaScript from the form hoping, it might be causing the issue but even then the sub-grids are not loading the records.
*This post is locked for comments
Hi Goutam,
The subgrids are part of multiple tabs.
One tab contains 6 sub grids and the remaining 2 subgrids are part of 2 different tabs.
Expanding and collapsing the tabs also does not refresh the grids.
I clear the cache and force the refresh the tab but that also fails to reload the grids.
As for refresh() on the subgrid, even when the grid exists the refresh method still throws an exception indicating refresh does not exist.
Hi Vikas,
Try to add each subgrid in a tab and then expand the tab to see subgrid , see the results.
In addition when you are doing refresh subgrid might be subgrid has not loaded , so put settimeout or call setintervel till the control get and do the refresh.
community.dynamics.com/.../240968 post has a similar issue but it seems the it is still not fixed
Mohamed Amine Mahmoudi
83
Super User 2025 Season 1
Community Member
54
Victor Onyebuchi
6