SharePoint Lists.asmx:查询返回“已删除” 日历项目?

发布于 2024-07-24 09:03:29 字数 990 浏览 2 评论 0原文

在针对 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.清除回收站中的所有内容 在 sharepoint 网络服务器上执行 iisreset

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

While running caml query's against the sharepoint list.asmx service, I have this strange behaviour that the GetListItems method also returns deleted items;

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

How is this happening? Do I need to apply a special filter on the caml query or something? I'm currently querying as follows;

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

What i've tried so far;
1. purge all the from the recycle bin
2. perform an iisreset on the sharepoint webserver

please note; im running in a VMWare Workstation environment.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

各空 2024-07-31 09:03:29

根据以往使用日历的经验,他们有一种非常奇怪(但合乎逻辑)的方式来处理重复发生的事件。 首先有两件事,日历本质上只是一个专门的列表(就像 SP 中的所有内容一样),上面有一个奇特的视图控件。

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

我希望这是有道理的。

Based on passed experience with Calendars, they have a very strange (but logical) way of dealing with recurring events. Two things first, calendars are fundamentally just a specialized list (as are all things in SP) with a fancy view control on it.

When an item is added to a calendar, a single item is added to the list. When a recurring event is added, SP does not add an infinite number of items on the list, it adds one special "recurring" item, as you noticed. Then if you remove some of the individual recurring events, (I.e. Weekly meeting, but it is cancelled next tuesday) SP adds a special 'removed event' item to the list. Those items aren't actually deleted in the sense that they exist and no longer exist, they are simply exceptions to the recurring event. So, they are filtered out when you view the calendar in list view, but they are 'real' individual SP List items on their own.

I hope that made sense.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文