Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/asp.net-mvc-3/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sharepoint 2007 SharePoint-在事件接收器中检查内容审批更改状态_Sharepoint 2007 - Fatal编程技术网

Sharepoint 2007 SharePoint-在事件接收器中检查内容审批更改状态

Sharepoint 2007 SharePoint-在事件接收器中检查内容审批更改状态,sharepoint-2007,Sharepoint 2007,我有一个启用了内容审批的SharePoint列表。业务需求是,一旦新列表项被批准,它应该保持批准状态,尽管任何用户都进行了进一步的更新 我的第一个想法是处理ItemUpdate方法,如果相应的before属性被批准,那么将after属性设置为Approved。然而,这不起作用 在ItemUpdate方法中,“批准状态”列不会显示在properties.BeforeProperties或properties.AfterProperties中。properties.ListItem[“Approva

我有一个启用了内容审批的SharePoint列表。业务需求是,一旦新列表项被批准,它应该保持批准状态,尽管任何用户都进行了进一步的更新

我的第一个想法是处理ItemUpdate方法,如果相应的before属性被批准,那么将after属性设置为Approved。然而,这不起作用

在ItemUpdate方法中,“批准状态”列不会显示在properties.BeforeProperties或properties.AfterProperties中。properties.ListItem[“Approval Status”]和properties.ListItem.ModerationInformation.Status都显示“before”值。在ItemUpdated方法中,情况相同,只是显示的值是“after”值

这两种方法中有没有一种方法可以同时识别前后两种方法?我可以通过创建一个新的隐藏列来解决这个问题,我会在项目被批准时设置该列,但这似乎不是最好的

我应该从工作流的角度来处理这个问题吗?

这会有帮助吗


将字段的内部名称与AfterProperties或BeforeProperties一起使用。 i、 e.属性。AfterProperties[“内部名称”]


它适用于我

有关文档库,请参阅AfterProperties部分中的以下属性

文档库与列表有些不同。文档库具有.AfterProperties[“vti_doclibmodstat”]和.AfterProperties[“vti_doclibmodcomm”]。

不幸的是,“批准状态”/“审核状态”不会出现在BeforeProperties或AfterProperties集合中。\审核状态确实会出现在AfterProperties集合中(当然,当它发生更改时).不知道我以前是怎么错过的。