In my SPItemEventReceiver I have two methods one ItemCheckedOut and one ItemUpdated.
In the ItemCheckedOut I update one listitem column.
In the other one I do some other updates to the listitem.
When I implemented this ItemCheckedOut I started receive "Save conflict" when I try to publish the item.
The Itemupdated is not even getting trigged.
public override void ItemCheckedOut(SPItemEventProperties properties)
{
SPSecurity.RunWithElevatedPrivileges(delegate
{
using (var site = new SPSite(properties.Web.Site.ID))
{
using (var web = site.OpenWeb(properties.Web.ID))
{
web.AllowUnsafeUpdates = true;
var item = properties.ListItem;
EventFiringEnabled = false;
item[BuiltInFieldId.Approval] = false;
item.Update();
web.AllowUnsafeUpdates = false;
}
}
});
How can I solve this issue?