Showing posts with label 5000. Show all posts
Showing posts with label 5000. Show all posts

Wednesday, 23 April 2014

SharePoint 2010 list view throttling and custom CAML

SharePoint 2010 list view throttling and custom CAML queries
Error:  ActiveX error 500
SharePoint List Throttling & Indexed Columns
Recently i faced one problem while getting list data using client object model.
i used caml query, it was working fine, when the list item count is <5000. One day list item count is exceeds 5000 then my query is not working.
I have tried below approach to solve the problem.
Create Index in Any column in the List
Update the Quey with Indexed column.
Ex:
"<Query>"
+"<Where><And><IsNotNull><FieldRef Name=\"IndexedColumn\" /></IsNotNull>"
+<Eq><FieldRef Name=\"Column2\" /><Value Type=\"Text\">"Search Key Word"</Value></Eq>
+"</And></Where>"
+"<OrderBy>"
+"<FieldRef Name='SID' Ascending='False' />"
+"</OrderBy>"
+"</Query>";
-------------------------------------------------------------------------------------------------------
Another Solution
Try to query against the lookup value, so that it will solve the problem.
If you are over the list view threhold limit you have to query against the id and then it works:
string query = @" <Where><Eq><FieldRef Name='Land' LookupId='TRUE' /> <Value Type='Integer'>1</Value> ";

Monday, 3 March 2014

This view cannot be displayed because it exceeds the list view threshold (5000 items) enforced by the administrator

This view cannot be displayed because it exceeds the list view threshold (5000 items) enforced by the administrator
We have to change some setting in CA (Central Admin)
By default ‘List View Threshold’ is set to 5000, you need to change the setting if you need to show more than 5000 items. Please ask your administrator to increase the ‘List View Threshold’ value. Steps to reset the value :
Open Central Administration
Go to ‘Manage Application’ under ‘Application Management’
Choose the web application in which you want to make the changes (example :http://SP2010:80)
In the ribbon follow ‘General Settings -> Resource Throttling’ there you can find ‘List View Threshold’ is set to 5000, change the value you want
Note: it is not recommended to change the default threshold limit