Sharepoint 分页查询列表

Sharepoint Querying a list with paging

我正在使用 SOAP UI 查询 Sharepoint 列表。这是我**更新的** SOAP 请求:

 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://schemas.microsoft.com/sharepoint/soap/">
   <soapenv:Header/>
   <soapenv:Body>
      <soap:GetListItems>
         <!--Optional:-->
         <soap:listName>Example</soap:listName>
         <!--Optional:-->
         <soap:viewName>{AAAAA-AAAA-AAA-AAAAA}</soap:viewName>
         <!--Optional:-->
         <soap:query>
            <Query>
            </Query>
         </soap:query>
         <!--Optional:-->
         <soap:viewFields>
            <ViewFields>
                <FieldRef Name="Author" />
                    <FieldRef Name="ContentType" />
                    <FieldRef Name="ContentTypeId" />
            </ViewFields>
         </soap:viewFields>
         <!--Optional:-->
         <soap:rowLimit>1000</soap:rowLimit>
         <!--Optional:-->
         <soap:queryOptions>
            <QueryOptions>
                   <ViewAttributes Scope="RecursiveAll"/>
            </QueryOptions>
         </soap:queryOptions>
         <!--Optional:-->
         <soap:webID></soap:webID>
      </soap:GetListItems>
   </soapenv:Body>
</soapenv:Envelope>

当我 运行 时出现以下错误:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:Server</faultcode>
         <faultstring>Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.</faultstring>
         <detail>
            <errorstring xmlns="http://schemas.microsoft.com/sharepoint/soap/">The query cannot be completed because the number of lookup columns it contains exceeds the lookup column threshold enforced by the administrator.Operations that exceed the list view threshold are allowed in the following time window defined by the administrator: &lt;br/>&lt;b>Daily, from  7:00:00 PM to 11:00:00 PM . &lt;/b></errorstring>
            <errorcode xmlns="http://schemas.microsoft.com/sharepoint/soap/">0x80070093</errorcode>
         </detail>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>

我可以在错误中提到的时间内访问该列表,但是是否有任何方法可以通过分页或其他方式允许在这些时间之外访问该列表?感谢您的任何帮助。

该错误不是在抱怨结果的数量,而是在抱怨视图中显示的查找列的数量。

当您在 CAML 查询中包含查找列时,SharePoint 必须在幕后做一些额外的工作来查询相关列表并提取相关信息。这会影响数据库性能,因此 SharePoint 在工作时间内对每个查询设置了 8 个查找列的默认限制。 (在 SharePoint 2013 中扩展到 12。)有关详细信息,请参阅 this Microsoft blog post

请注意,就阈值而言,"lookup columns" 包括 LookupPerson 或 Group 类型的列,因为以及 工作流状态 列。

要在工作时间执行查询,您可以从视图中删除列,直到视图不再显示超过 8 个查找列。