Retrive more than 5K records in Microsoft CRM
In Microsoft CRM a considerable lot of the individuals know retrive the records from CRM application.But in application we as a whole have realize a few constraints is there.If you will retrive upto 5K records is permitted. A portion of the cases we have to retrive more than 5K records then that time we will look and think numerous ways.
We need to retrive more than 5k all individuals will do "paging cookie" Through modules or javascript. It is somewhat difficult to the individuals and it will require some investment as we probably am aware.
So now I might want to propose to retrive more than 5k records we ought to follow the "XrmServiceToolkit " And retrive effectively in less time.Here the beneath code is utilized to retrive the records without any problem.
Code: Retrive More than 5k records using javascript
function page(e) {
debugger;
var fetch = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>" +
" <entity name='new_sampledata'>" +
" <attribute name='new_sampledataid' />" +
" <attribute name='new_name' />" +
" <attribute name='createdon' />" +
" <attribute name='new_muhammedmacintyre' />" +
" <order attribute='new_name' descending='false' />" +
" <filter type='and'>" +
" <condition attribute='statecode' operator='eq' value='0' />" +
" </filter>" +
" </entity>" +
"</fetch>";
var ResultsRetrived = XrmServiceToolkit.Soap.Fetch(fetch,true,ResultsRetrived);
for (var i = 0; i < ResultsRetrived.length; i++) {
var count = ResultsRetrived.length;
}
alert(count);
}
1 Comments
I ran into this problem using flows. Currently with flows you can retrieve a list of records using either a fetchxml query or odata query.
ReplyDeleteWith odata query you can retrieve more than 5000 records but are limited to how many filtering queries you can perform (eg. Last name contains data). You can only perform 10 of these in odata.
With fetchxml you can have more than 10 queries in your overall query but you are limited to 5000 records.
Note: what you have written in your article is still correct just pointing this out for anyone interested for flows