From: http://geekswithblogs.net/claraoscura/archive/2011/01/21/143569.aspx

The problem: I have an item adding event receiver associated with a custom content type that accesses several managed metadata fields using the syntax "PublishingPage.ListItem["fieldname"]". Suddenly, I started getting the "Value does not fall within the expected range" when accessing one of the managed metadata fields. I had nothing else except the message and, more annoyingly and off-setting, it only happened with some users. It worked for users who were local administrators of the SharePoint server. This really sent me in the wrong direction.

The solution: Check the "List View Lookup Threshold" for the web application (in CA, under the web application general settings). The default is 8. Managed metadata fields in a list are actually lookup fields, so if you have more than 8, error. What I don't know is why I didn't get this error with local adminstrators (maybe the threshold doesn't apply to them?). The reason I had more than 8 managed metadata fields in my list is that, after each new deploy of my content type, the field kept duplicating itself. I think I now solved this problem too by adding Overwrite="TRUE" OverwriteInChildScopes="TRUE" to the field definition.

Solution source: http://social.technet.microsoft.com/Forums/en-US/sharepoint2010programming/thread/65e04367-e926-404b-b355-825a52f4ce69/

 

另外,微软官方关于List view Lookup threshold的文章如下: https://blogs.msdn.microsoft.com/spses/2013/12/02/sharepoint-20102013-list-view-lookup-threshold-uncovered/

 

posted on 2017-07-06 13:56  今夜太冷  阅读(392)  评论(0编辑  收藏  举报