#StackBounty: #sharepoint-online #csom #caml-query #large-lists #list-view-paging Difference between camlQuery.AllowIncrementalResults=…

Bounty: 50

My aim is to get all items from a SharePoint List (>5000 items). I have used the standard pagination based approach and it is working fine.

ListItemCollectionPosition position=null;

do{
   CamlQuery caml=new CamlQuery(){ViewXml="<View><RowLimit Scope='RecursiveAll'>5000</RowLimit></View>"};
 caml.ListItemCollectionPosition = position;
   ListItemsCollection items=list.getItems(caml);
   context.Load(items);
   context.executeQuery();
   foreach(var item in items){
   //do stuff
   }
   position=items.ListItemCollectionPosition;
}while(position!=null);

However, I recently came across a code sample where it also includes the line:
caml.AllowIncrementalResults=true; in the article:
https://gp23.com.au/2019/01/16/sharepoint-online-list-view-thresholds/

I would like to know the impact for setting the AllowIncrementalResults=true.
The documentation in msdn is very sparse.


Get this bounty!!!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.