SharePoint 重复事件是随机的吗?

标签 sharepoint sharepoint-online recurring-events sharepoint-webservice

注:此问题类似于现有的未回答问题 ( CAML OrderBy for SharePoint Recurring Calendar Event )。

如何使用 Lists.asmx Web 服务来检索今天或以后发生的重复事件?

我提供 <CalendarDate>2019-06-25T15:55:04.108Z</CalendarDate>/_vti_bin/Lists.asmx 发送请求时的参数网络服务,但我仍然收到过去的事件(如下面的屏幕截图所示)!

这是 XML 响应(屏幕截图)。请注意事件日期如何在今天之前,即使“CalendarDate”被指定为“2019-06-25”:

enter image description here

这是随请求发送的 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>

编辑:以下是上述查询未返回的事件示例。

enter image description here

最佳答案

Year不兑现CalendarDate属性 - 它返回从当前日期起一年内发生的先前事件和从当前日期起一年内发生的 future 事件。

使用 <Value Type='DateTime'><Now /></Value>DateRangesOverlap并删除 CalendarDate检索今天或以后发生的重复事件

关于SharePoint 重复事件是随机的吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56761425/

相关文章:

共享点包设置

sharepoint - 在 SharePoint 2013 中以不同用户身份登录

sharepoint - 在SharePoint Online中使用Powershell更改列表字段

powershell - PowerShell-将 “Get PnPListItem”与value参数一起使用

javascript - "Uncaught TypeError: Cannot read property ' 将重复事件添加到数据库时克隆 ' of undefined"

SharePoint 导出到 excel 在谷歌浏览器中不起作用

javascript - Sharepoint 如何识别您当前的站点是根站点还是子站点(子站点级别)?

rest - 尝试使用用户配置文件 REST API 访问用户属性

iphone - iOS 应用程序如何以重复的方式(即每小时一次)在后台运行某个函数?

python - 为重复发生的事件安排提醒