Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top