Pages

Wednesday, January 25, 2012

Document Library ItemUpdated event occurring twice

Hello

I have been working on Document Library ItemUpdated EventHandler and getting very frustration result, each time it runs twice, this is bad, as it calls back database requests and makes slow system.
Now what to do? Well, we do have one workaround; write this one in the ItemUpdated event of documentlibrary.
if (properties.AfterProperties["vti_sourcecontrolcheckedoutby"] == null &&
    properties.BeforeProperties["vti_sourcecontrolcheckedoutby"] != null)

Enjoy this Workaround!!!

Thanks
Disha Shah

No comments:

Post a Comment