I have an event receiver - ItemUpdated - that is attached to my task list and is firing twice.
The event receiver only checks if item["Status"] == "Completed" then it will just send an email notification.
As you can see it doesnt update the same item. it just gets the value of the Status column.
However when I debug it, it triggers the ItemUpdated at random parts of the code.
I also checked how many eventreceivers are attached in the list and its only ONE(1)
I have also specified the event receiver to be attached to my Task list in the Elements.xml.
I also did this but still no luck
this.EventFiringEnabled = false;
if (properties.Web.ID.ToString().Equals(Constants.webId))
{
SPListItem task = properties.ListItem;
if (Convert.ToString(task["Status"]) == "Completed")
{
//send email
}
}
this.EventFiringEnabled = true;----------------------- Sharepoint Newbie