Forum Discussion
The attempted operation is prohibited because it exceeds the list view threshold
Sudharsan K Thank for your response but this seems to be through javascript. I am making a call to search api through c# desktop application. So it would not be a feasible solution for me.
Ankush_Daga Can you refer the below links and let me know if it suits you.
https://www.codeproject.com/Articles/281693/Paging-SharePoint-List-Items
https://keepitsimplekarthik.com/sharepoint/listitemcollectionposition-and-pageinfo/
- Ankush_DagaApr 13, 2020Copper Contributor
Sudharsan K I have already tried using 'ListItemCollectionPosition' . It works fine with records less than 5000 but once my document library exceeds files count then it throws the threshold error. So without removing 'Where' clause from the query or 'Filters' from the api's it throws an error (possibly due to threshold limit). If i remove this where clause or filter then it works fine with row limit as well as pagination. But this is again a perfromance hit as It will be bringing all the records rather than filtering them. So i am looking for some approach in which it works with where (caml query) or filter (Rest api's).
- Sudharsan KApr 13, 2020Iron Contributor
Hi,
Have you tried using query.QueryThrottleMode = SPQueryThrottleOption.Override;Refer the below link too
https://www.codeproject.com/articles/1076854/overcoming-the-list-view-threshold-in-sharepoint-c