0

I have a Deleting Event Receiver, say, on list A. Also I have other Deleting Event Receiver on list B. There is a deleting method in both receivers, which deletes items of each other. So, when an item is being deleted in list A the event receiver on list B also rises to delete item in list A. Cyclic calling of event receivers appears.

How can I escape of this situation? I need delete items from list A and list B wherever Event Receiver is called.

andDaviD
  • 555
  • 1
  • 11
  • 26

1 Answers1

0

Did you try disabling the events ?

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.speventreceiverbase.eventfiringenabled.aspx

So you set in your event receiver code at the beginning

this.EventFiringEnabled = false;

// Do deletion of other item

this.EventFiringenabled = true;
DJ.
  • 654
  • 4
  • 6
  • You are right.The same answer I got [here](http://sharepoint.stackexchange.com/questions/38539/cyclic-calling-of-event-receivers). – andDaviD Jun 15 '12 at 11:00