Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Dynamics 365 - Charts cannot be seen - Refresh Subgrid

$
0
0

Hello,

I have tabs in my form and all of them include subgrids in that subgrids there are charts but when I load the page , the charts dont load. I see that message "Click here to load the chart". I thought when the page loaded subgrids dont load. This is why Form's onLoad ı wanna trigger subgrids. I am trying the code at the below but I am taking that error " Cannot read property 'refresh' of null atMscrm.TurboForm.Control.ViewModel.SubGridViewModel.refresh ....."

I'm trying these methods to load subgrids when the page is loaded at the below 

function Form_OnLoad() {
debugger;

setTimeout(LoadSubGrids(), 10000); //need delay to work properly
}

function LoadSubGrids() {
debugger;

var grids = Xrm.Page.ui.controls.get(function (ctrl, index) {
return (ctrl.getControlType() == "subgrid");
});

if (grids.length > 0) {
for (var i = 0; i < grids.length; i++) {
if (grids[i] != null && this.grids[i] != null && this.grids[i] != undefined) {
grids[i].refresh();

}
}
}

}


Viewing all articles
Browse latest Browse all 82002

Latest Images

Trending Articles



Latest Images