Sharepoint 审批文档时处理事件

Sharepoint 审批文档时处理事件,sharepoint,event-handling,Sharepoint,Event Handling,在SharePoint中 使用事件接收器,我们如何确定用户何时批准了文档库中的文档 我认为应该在ItemAdded或ItemAdding事件中捕获它 有什么想法吗 谢谢。ItemUpdated是要使用的事件接收器,除非您想“覆盖”批准(并可能保持项目未批准)-在这种情况下,您应该使用ItemUpdated 要检查项目是否已批准,您可以尝试以下代码: public override void ItemUpdated(SPItemEventProperties properties) { if

在SharePoint中

使用事件接收器,我们如何确定用户何时批准了文档库中的文档

我认为应该在ItemAdded或ItemAdding事件中捕获它

有什么想法吗


谢谢。

ItemUpdated是要使用的事件接收器,除非您想“覆盖”批准(并可能保持项目未批准)-在这种情况下,您应该使用ItemUpdated

要检查项目是否已批准,您可以尝试以下代码:

public override void ItemUpdated(SPItemEventProperties properties)
{
   if (properties.ListItem["Approval Status"] == "Approved")
   //Do Something
}
希望能有帮助