문제

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.

도움이 되었습니까?

해결책

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;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top