Hi,
I am unable to get subgrid record count on load of form in CRM HUB UI. I am using following javascript to get record count. It's working fine in classic ui,but its not working in HUB UI (returning record count 0,which is wrong).
function getTotalGridRecordCount()
{
debugger;
var functionName="onLoad";
try{
setTimeout( function(){
if (Xrm.Page != null && Xrm.Page != undefined && Xrm.Page.getControl("Contacts") != null && Xrm.Page.getControl("Contacts") != undefined) {
var count=Xrm.Page.getControl("Contacts").getGrid().getTotalRecordCount();
alert(count);}},5000);
}
catch(e)
{
Xrm.Utility.alertDialog(functionName + "Error: " +e.message || e.description);
}
}
*This post is locked for comments
I have the same question (0)