I’ve a doc library which comprise 6,000 ++ objects, and that i wrote the next code inside a distant occasion receiver to get the paperwork that are inside sure folder utilizing FolderServerRelativeUrl, as comply with:-
ListItemCollectionPosition place = null;
do
{
CamlQuery camlQuery6 = new CamlQuery();
camlQuery6.ViewXml = @"<View Scope='Recursive'><Question></Question><RowLimit>5000</RowLimit></View>";//string.Format("<View Scope="RecursiveAll"><Question><The place><Neq><FieldRef Identify='ID' /><Worth Kind='Textual content'>{0}</Worth></Neq></The place></Question><RowLimit>{1}</RowLimit></View>", "0", "3000");
camlQuery6.ListItemCollectionPosition = place;
camlQuery6.FolderServerRelativeUrl = context.Internet.ServerRelativeUrl + "/ArchDocs/" + currentFilingSystemItem["DealName"].ToString();
ListItemCollection collListItem6 = context.Internet.GetList(context.Internet.ServerRelativeUrl + "/ArchDocs").GetItems(camlQuery6);
context.Load(collListItem6, objects => objects.Embody(
merchandise => merchandise.Id,
merchandise => merchandise["FileDirRef"],
merchandise => merchandise["Title"],
), objects => objects.ListItemCollectionPosition);
context.ExecuteQuery();
place = collListItem6.ListItemCollectionPosition;
foreach (ListItem listItem in collListItem6) // acquire the objects we discovered on this chuck of searched objects
{
foundListItems.Add(listItem);
}
}
whereas (place != null);
foreach (ListItem merchandise in foundListItems)
{
}
however my above code will elevate this error, though i’m utilizing paging which ought to enable me to question massive doc libraries :-
The tried operation is prohibited as a result of it exceeds the checklist view threshold enforced by the administrator.
any recommendation on this please? Thanks