忽略共享点列表中未签入条目的更新 (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?
签出状态通过以下方式确定:
其中
item
是SPListItem
-Oisin
Checked out status is determined via:
where
item
is anSPListItem
-Oisin