Hi,
I am struggled with a performance problem regarding the count of the records in the advanced find window using the Online version of the CRM 2016.
I have managed to get the fetchXml data of the query and, when I press my custom "record count" button, I do a fetch request through xrmservicetoolkit and then count the records retrieved.
As you can imagine the time to retrieve the data is very long, lets say that for 250K records it require 1:50 minutes.
XrmServiceToolkit.Soap.Fetch(fetchString, true, function(result){ console.log("this will appear when the fetch is completed"); var webResourceData = encodeURI("count=" + result.length); console.log("count: " + result.length); Xrm.Utility.openWebResource("goal_advancedfindcountresult",webResourceData,200, 100); return; });
I have tried with the aggregate but is not possible to count more than 5000 records.
Any in how to avoid fetching all the data and only get the count?
Thanks in advance
Andrea