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;

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

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.

  • I also didn't find much information about this property except it has been added in the CSOM package released in December 2017 (v16.1.7206.1200). If that helps you narrow down the internet searches. Jun 18 '20 at 6:05
  • Yes. That's the only bit of info I got in my searches too :(. Jun 18 '20 at 6:21
  • Wow you got me trawling through the low level protocol [MS-CSOMSPT] documentation on this one. Jul 13 '20 at 4:56
  • I read that too. Did not find the answer there either. @JamesRandal Jul 13 '20 at 12:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.