I expose my scenario and my issue.
Scenario
I have one custom list
in SharePoint 2010 Foundation called Actions. This list has one event receiver that override this methods:
- ItemAdded
- ItemUpdated
- ItemCanceled
Inside the method ItemAdded
I perform these actions:
- Update column's item
- Update item's roles
- Add items inside other lists
Now, inside my SiteCollection there is another Event Receiver of list Projects that when one item is added perform these actions:
- Read data from one list called Task Template
- Copy retrieved data inside Task list.
Issue
When I add one item inside Projects list code of ItemAdded of Actions list raise one COMException
. Below is some more info about exception:
Your changes conflict with those made concurrently by another user. If you want your changes to be applied, click Back in your Web browser, refresh the page, and resubmit your changes. Stacktrace: at Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx) at Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, ...
Inner Exception
Exception type: System.Runtime.InteropServices.COMException Message : Save Conflict.
Your changes conflict with those made concurrently by another user. If you want >your changes to be applied, click Back in your Web browser, refresh the page, >and resubmit your >changes.0x81020015 Stacktrace: at Microsoft.SharePoint.Library.SPRequestInternalClass.AddOrUpdateItem(String bstrUrl, String
Debugging my application I discovered that exception above is raised when I try to perform this action:
item.Update();
How do I resolve this?