随笔 - 547  文章 - 213 评论 - 417 阅读 - 107万

 

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   今夜太冷  阅读(396)  评论(0编辑  收藏  举报
编辑推荐:
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· Open-Sora 2.0 重磅开源!
· 周边上新:园子的第一款马克杯温暖上架
历史上的今天:
2016-07-06 OleView.exe:查看机器上的COM 组件。
2016-07-06 COM中导出GUID
2016-07-06 进程外组件以及进程间通信方式
2016-07-06 拼接多个 wchar_t *
2015-07-06 Font Awesome使用简介
点击右上角即可分享
微信分享提示