1

We are using Event-receivers in SharePoint 2013. Whenever we are updating an item in a list event-receiver, the receiver will be triggered again and again. To avoid this we are using this.EventFiringEnabled = false.

Now my doubt is this.EventFiringEnabled = false, will this affect all lists in SharePoint site or only in the particular list?

I searched and in some articles they told it will affect all lists. Is it Correct?

If it will affect all lists, does this mean only in that particular web-application lists or all web applications lists?

We are using four web applications, so if we are using this.EventFiringEnabled = false, does it affect all four web-applications?

This my code

namespace eContracts.EntityEvents
{
    public class EventReceiverManager: SPEventReceiverBase, IDisposable
    {

        public EventReceiverManager(bool disableImmediately)
        {
            EventFiringEnabled = !disableImmediately;
        }
        public void StopEventReceiver()
        {
            EventFiringEnabled = false;
        }
        public void StartEventReceiver()
        {
            EventFiringEnabled = true;
        }

        public void Dispose()
        {
            EventFiringEnabled = true;
        }
    }
}

How can we do this.EventFiringEnabled = false; for only a particular list?

  • If you haven't defined scope than it will affect all lists in particular site collection. If you want to limit it to single list than you have to define it to event receiver. If You can send sample code than i will help you to work it for single list. – Hardik Apr 12 '16 at 11:15
  • 1
  • Hi if anyone know about this please share with me if scope is web-application means(this.EventFiringEnabled = false) it should affect all webapplication? – Elina Apr 12 '16 at 13:05
  • It will affect the current instance of the event receiver only. – Paul Strupeikis Apr 13 '16 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.