【发布时间】:2019-11-07 17:27:55
【问题描述】:
注意:此问题类似于现有的未回答问题 (CAML OrderBy for SharePoint Recurring Calendar Event)。
我如何使用 Lists.asmx 网络服务来检索今天或以后发生的重复事件?
我在向/_vti_bin/Lists.asmx Web 服务发送请求时提供了<CalendarDate>2019-06-25T15:55:04.108Z</CalendarDate> 参数,但我仍然接收到过去的事件(如下面的屏幕截图所示)!
这是 XML 响应(屏幕截图)。请注意,即使“CalendarDate”被指定为“2019-06-25”,事件日期在今天之前:
这是随请求发送的 XML 负载:
<soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>
<soap:Body>
<GetListItems xmlns='http://schemas.microsoft.com/sharepoint/soap/'>
<listName>{ my list GUID }</listName>
<query>
<Query>
<OrderBy>
<FieldRef Ascending='TRUE' Name='EventDate' />
</OrderBy>
<Where>
<And>
<Eq>
<FieldRef Name="fRecurrence" />
<Value Type="Boolean">1</Value>
</Eq>
<DateRangesOverlap>
<FieldRef Name="EventDate" />
<FieldRef Name="EndDate" />
<FieldRef Name="RecurrenceID" />
<Value Type='DateTime'>
<Year/>
</Value>
</DateRangesOverlap>
</And>
</Where>
</Query>
</query>
<viewFields>
<ViewFields>
<FieldRef Name="Category" />
<FieldRef Name="Location" />
</ViewFields>
</viewFields>
<queryOptions>
<QueryOptions>
<ViewAttributes Scope="RecursiveAll" />
<RecurrencePatternXMLVersion>v3</RecurrencePatternXMLVersion>
<DateInUtc>TRUE</DateInUtc>
<ExpandRecurrence>TRUE</ExpandRecurrence>
<CalendarDate>2019-06-25T15:55:04.108Z</CalendarDate>
<RecurrenceOrderBy>TRUE</RecurrenceOrderBy>
</QueryOptions>
</queryOptions>
<rowLimit>20</rowLimit>
</GetListItems>
</soap:Body>
</soap:Envelope>
编辑:以下是上述查询未返回的事件示例。
【问题讨论】:
标签: sharepoint sharepoint-online recurring-events sharepoint-webservice