web-services - SharePoint 列表.asmx : query returns "deleted" Calendar items?

标签 web-services sharepoint caml

在针对 sharepoint list.asmx 服务运行 caml 查询时,我有这种奇怪的行为,即 GetListItems 方法还返回已删除 项目;

found item: test
found item: already done
found item: recurring
found item: recurring event 3-4
found item: Deleted: recurring event 3-4
found item: Deleted: recurring event 3-4
found item: Deleted: recurring event 3-4
found item: Deleted: recurring event 3-4
found item: Deleted: recurring event 3-4
found item: todays event 15-16 //<- NOT DELETED YET

这是怎么回事?我需要在 caml 查询上应用特殊过滤器吗?我目前查询如下;

<Query>
  <OrderBy>
     <FieldRef Ascending='TRUE' Name='EventDate' />
  </OrderBy>
  <Where>
     <Eq>
        <FieldRef Name='EventDate' />
        <Value Type='DateTime'><Today /></Value>
     </Eq>
  </Where>
</Query>

到目前为止我已经尝试过什么; 1.从回收站中清除所有 2. 在 Sharepoint 网络服务器上执行 iisreset

请注意;我在 VMWare Workstation 环境中运行。

最佳答案

根据过去使用日历的经验,它们有一种非常奇怪(但合乎逻辑)的方式来处理重复发生的事件。首先有两件事,日历基本上只是一个专门的列表(就像 SP 中的所有东西一样),上面有一个漂亮的 View 控件。

当一个项目被添加到日历中时,单个项目被添加到列表中。添加重复事件时,SP 不会在列表中添加无限数量的项目,它会添加一个特殊的“重复”项目,如您所见。然后,如果您删除了一些单独的重复事件(即每周 session ,但下周二取消),SP 会在列表中添加一个特殊的“已删除事件”项目。这些项目实际上并没有被删除,因为它们存在并且不再存在,它们只是重复事件的异常(exception)。因此,当您在 ListView 中查看日历时,它们会被过滤掉,但它们本身就是“真实的”独立 SP 列表项。

我希望这是有道理的。

关于web-services - SharePoint 列表.asmx : query returns "deleted" Calendar items?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/950415/

相关文章:

c# - K2 流程取消

c# - Sharepoint CAML 中的 OR 问题

linq - 查询 SharePoint OData 服务时在 LINQ 中使用日期比较

javascript - 使用开放层打印 SOS 服务的响应

Java 5 授权 header 字符集 ISO-8859-2

java - 不使用 servlet 访问 REST Web 服务

web-services - 使用 commons-httpclient 和 EWSJavaAPI 获取 nullPointerException

c# - 读取文档库中的文件 : "The label that' s applied to this item. .."C#

c# - Server.TransferRequest() 和 http 状态码

sharepoint - 使用 SPQuery 检索不同/唯一值的最佳方法是什么?