忽略共享点列表中未签入条目的更新 (SPAudit)
好吧,正如标题所暗示的那样,这有点难以解释。
我在 ItemUpdated 和 ItemCheckedIn 上有一个事件接收器,它们都写入自定义 SPAuditEntries。不过,当 CheckedIn 发生时,它还会附带两个更新条目(一个用于添加的文件,另一个用于对我怀疑的列表项进行简单更新)。
我很想删除这些条目。起初我认为这非常简单,只需在 itemUpdated 事件接收器中放入一个 if ,然后停止一切
if(SPListItem.CheckedOut = false) { //... do nothing }
,但是我找不到任何方法来确定列表项的结账状态。 我的下一个想法是,它们几乎在同一时间命中,因此我可以爬入auditCollection,过滤到特定的列表项、用户和时间(减去一秒)并删除这两个条目。但是,遗憾的是我发现我无法删除审计条目。
有人有什么想法吗?
Okay, this is a little hard to explain, as the title might suggest.
I have an event receiver on ItemUpdated and ItemCheckedIn, which both writes custom SPAuditEntries. When CheckedIn occurs though - it comes with two update entries as well (one for added file, and one for a simple update to the list item I suspect).
I'd love to get rid of these entries. At first I thought it would be really simple, just put an if in the itemUpdated event receiver, and stop everything
if(SPListItem.CheckedOut = false) { //... do nothing }
However I couldn't find any way to ascertain the checkout-status of the listitem.
My next thinking was, they hit almost at exactly the same time, so I could just crawl into the auditCollection, filter down to the specific listitem, user, and time (minus a second) and delete the two entries. But, sadly I found out I couldn't delete auditentries.
Anyone got any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
签出状态通过以下方式确定:
其中
item
是SPListItem
-Oisin
Checked out status is determined via:
where
item
is anSPListItem
-Oisin