0

I have an sp2013 portal. I have a custom contenttype and a custom list. I have an eventreceiver (ItemUpdating) which is updating a column in the current listitem. Sometimes I get this error. I think I got this error when I create a new item, and try to edit it too fast. Can I prevent this message??

The form cannot be submitted. 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.

1
  • I guess you have to lock item before update
    – variable
    Mar 21, 2014 at 16:56

4 Answers 4

2

Actually, I take back my previous answer. I misremembered something...

Just change the value of the field without calling the Update method on the item itself.

Since the change is being made before the item is actually saved, this should work without causing the error you mention.

1
  • 1
    This really saved me, thanks for the suggestion. I was using a custom control to update a property bag value on a page each time the user saved this (publishing) page. I used SystemUpdate() to update the item, which worked fine as long as the save/check-in/publish button was used for the postback of the page. However, when an editor uses a Summary Links web part for instance, all interactions with this web part cause postbacks and my SystemUpdate() was causing conflicts. The solution was as simple as you state: just leave out the update as the item will be updated anyway! Great suggestion :) Aug 27, 2015 at 9:07
1
  1. Why not write your code in ITEM UPDATED receiver? If no, then add some kind of DELAY in your code (thread.sleep....). Remember this is not idle & is not recommended.
  2. Are you disabling event firing in your itemUpdating receiver before calling listItem.Update(). You should disable then update then enable the receivers. I believe, while you are updating the item in the receiver, its internally again calling the same receiver sine its again an Update right.

Below is written in a workflow, you can try it out in a your receiver code as well by making appropriate changes obviously.

https://stackoverflow.com/questions/2466533/sharepoint-workflow-how-to-update-the-item-without-triggering-the-workflow-agai

0

We faced the similar issue, where 2 functions were updating the same item one after another using rest query. But since the item was not updated and saved properly in first time and second update was getting called, it gave the issue.

We resolved the issue by removing the update from second function, hope it helps someone.

-1

I faced a similar issue recently. The Error details in this case are quite self explanatory. I got it resolved using the method provided by below link.

Save Conflict

There's very short and accurate explanation with the two liner method code as resolution.

If you face difficulty implementing this solution, let me know.

Your Answer

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

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