I have a problem with my eventreceiver. It is set to fire on updating item from a list, and works very good when I update that item from Sharepoint's web UI. However I have some code that goes through a list and updates it with new values, and this for some reason doesn't fire the event. Here's the updating code:

            SPListItemCollection listItemCollection = list.GetItems(query);

        foreach(SPListItem item in listItemCollection)

            int itemID = matches.FindIndex(match => match.WebID == item["vG_ID"].ToString());
            if (itemID != -1)
                if (item["vG1"].ToString() != matches[itemID].TeamLeftScore.ToString() ||
                    item["vG2"].ToString() != matches[itemID].TeamRightScore.ToString())
                    item["vG1"] = matches[itemID].TeamLeftScore;
                    item["vG2"] = matches[itemID].TeamRightScore;

How do I fix that?

  • 1
    The ItemUpdated event should fire in this instance provided any updates are done. Are you sure it's not firing? Have you tried to set a breakpoint and attach to both the process doing the update and owstimer? Jul 30, 2012 at 12:07
  • Yes, it's definitely not firing. I don't know what should I look at since the event has been programmed by another person. Jul 30, 2012 at 12:18
  • 1
    If you haven't tried to set a breakpoint in it, how do you then know that it isn't firing and failing? If it really isn't firing are you code running in a context where the event receiver can be loaded? And is you code updating anything? Jul 30, 2012 at 12:34
  • I have the code here and I have set breakpoints and attached to processes. My code is updating everything properly, It's just that the event's clearly not firing at all. Jul 30, 2012 at 12:37
  • Ok, well, turns out there was some uncaught exception in my code's execution and that prevented the event from firing, for some reason. Thank you for your help Jul 30, 2012 at 12:52

1 Answer 1


As per Robert's suggestion, the answer to this is that an uncaught exception in the code's execution prevented the event from firing. Since Visual Studio was not catching it, I found it out by going through the ULS logs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.