Stop SharePoint events firing

To stop events firing in SharePoint 2007 we call a method to disable the event firing, perform our update and then call another method to enable it again. The code might look something like this.


This has changed in SharePoint 2010. We now have a protected property of type System.Boolean named EventFiringEnabled on the base class SPEventReceiverBase. Simply set this property to false to disable the event from firing before performing your update.

this.EventFiringEnabled = false;
this.EventFiringEnabled = true;

The methods used in SharePoint 2007 are still in the 2010 API but are marked as obsolete. Take note!


MSDN – SPEventReceiverBase.DisableEventFiring Method

MSDN – SPEventReceiverBase.EnableEventFiring Method

MSDN - SPEventReceiverBase.EventFiringEnabled Property

Adrian Henke’s Blog – Disable SharePoint item events firing during item updates

This entry was posted in SharePoint, SharePoint 2007, SharePoint 2010 and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>