I am getting below error while querying SharePoint list,list has 5005 records and threshold limit is 5000. I have a sharepoint list having different folders and i am using CAML query with RecursiveAll to get records from all folders. I am getting this error :-
The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator. at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream) at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse() at
My query is
"<View Scope='RecursiveAll'> <RowLimit>1000</RowLimit><Query><Where><Eq><FieldRef Name='Year' /><Value Type='Text'>" + Period + "</Value></Eq></Where></Query></View>";
Year is indexed column.If i remove where clause,it starts working.It seems to me recursiveall
is not working with where
clause.
I don't want to change list threshold limit.