I actually have struggled with masses even as my list is getting large and want to retrieve the rows more than 5K. Here I located the answer is to apply the Recursive call to retrieve more than 5K items.
Here we're doing the recursive call to the GetListItems() function. This will fetch information withinside the bunch of a thousand objects and concatenate it to the response variable.
Here data.d.__next includes the URL to get the next set of items. In case we don’t have more items left to fetch, it'll not call GetListItems() function.
Hope many of us will find this helpful.
How to get & edit list items from the list having 25k items?
ReplyDeleteUse following code to retrieve data using RESTAPI.
Deletefunction getRecord(id){
let urlString = `https://mysite.sharepoint.com/_api/Web/Lists/GetByTitle('my25KList')/items?$select=Id,Title&$filter=ID eq '${id}'`;
let call = returnAjax(urlString);
call.done(function (data,textStatus, jqXHR){
// do some action
}); // call.done
call.fail(function (jqXHR,textStatus,errorThrown){
alert("Error retrieving Tasks: " + jqXHR.responseText);
});
}//getRecord