문제

I have two lists List1 and List2. I have written code to update List2 item from ItemUpdating event of List1. This should fire ItemUpdated event of List2 but it does not. Below is the code I used to update List2 item.

var list = web.Lists["List2"];    
var item = list.GetItemById(Id);

item["City"] = "CityA";
item.Update();

List2 events fires when there is manual update in list but only failing in above case. What am I missing here?

도움이 되었습니까?

해결책

You've stated that you're doing a web.EventFiringEnabled = false in the event receiver for List1.

This will disable event firing across your entire web, including for List2. This explains why your event receiver for List2 is not firing.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top