-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Hi @DigitalFlow
Yesterday our FetchXml request has setting returnAllPages = true; and it ok. The return result about 2,000 rows, but we understand in feature it maybe more than 5,000 rows that why we set this value.
But today, i get an error when execute the same query, I'm sure nothing change from yesterday.
Now, if I change the setting returnAllPages = false; and it ok again. wwowowow.
Look at the core js and i found maybe something wrong in the checking condition
...
var nextLink = GetNextLink(response);
var pagingCookie = GetPagingCookie(response);
response = MergeResults(parameters._previousResponse, response);
// Results are paged, we don't have all results at this point
if (nextLink && (WebApiClient.ReturnAllPages || parameters.returnAllPages)) {
SetPreviousResponse(parameters, response);
SendSync("GET", nextLink, null, parameters);
}
else if (pagingCookie && (WebApiClient.ReturnAllPages || parameters.returnAllPages)) {
var nextPageFetch = SetCookie(pagingCookie, parameters);
SetPreviousResponse(parameters, response);
parameters.fetchXml = nextPageFetch;
WebApiClient.Retrieve(parameters);
}
}The first if passed because the nextlink is undefined
The second else if will run because pagingCookie now have value with setting returnAllPages = true; or returnAllPages = false; and the exception throw in the method SetCookie
I guest something change from the response, so the function GetPagingCookie always has data.
Note: I'm using async = false;, return rows <2,000 rows, setting returnAllPages = true;
Please help review my issue and thanks for a great WebApi, we love it and use it in all company projects.