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

Subgrid method getTotalRecordCount returning -1 after adding a record to the subgrid

$
0
0

I am getting a subgrid's recordcount inside of its onload function like so:

Xrm.Page.getControl('AllAddresses').addOnLoad(function () {

var totalCount = Xrm.Page.getControl('AllAddresses').getGrid().getTotalRecordCount();

console.log(totalCount); 

});

If I add a record to the subgrid this function is triggered again, but this time totalCount is -1. 

This should be the actual count of the records in the subgrid. If I reload the entire page it will log the correct count


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>