3
votes

My default "Pages"-List-View in Sharepoint has to much columns so it will not show up. The following error is displayed:

This view cannot be displayed because the number of lookup and workflow status columns it contains exceeds the threshold (8) enforced by the administrator.

I know how to fix this using the central administration (like described here: How to enable a view in SharePoint2010 where there can be more than 8 Lookup columns present?)

But I want to change that setting automaticly by feature activation with C#-Code. Can this be done by code?

1
i dont know how to CHANGE the setting but you should be able to turn it OFF this way: var list = SPContext.Current.Web.Lists["SuperActionHeroList"]; list.EnableThrottling = false;LMW-HH
That would disable it in the current context, but I need to change that generally so I can view the list in SP-Backend (NO CODE there)Ole Albers

1 Answers

2
votes

The SPWebApplication.MaxQueryLookupFields property determines the maximum number of lookup fields that may be included in a list item query.