Item Updating or Updated Event Occurs twice in Document Library

Item Updating or Item Updated Event in SharePoint 2007 occurs twice, if require checkout option is enabled for document library.

I found the following workaround from Microsoft Support for this issue.

Check the value of vti_sourcecontrolcheckedoutby
во BeforeProperties и AfterProperties, if the both values are null then the event is triggered by check in else the event is triggered by other actions.

ако (properties.AfterProperties[“vti_sourcecontrolcheckedoutby”] == null && properties.BeforeProperties[“vti_sourcecontrolcheckedoutby”] != null)

{

//This is when the update event is triggered by check-in.

}

на друго место

{

//This is triggered by events other than check-in action.

}

Comments are closed.