Sharepoint Error: Save Conflict Your changes conflict with those made concurrently by another user

If you develop Sharepoint components that modify list items, you might know this error:

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.

This happens whenever you try to save a SPListItem which has been modified since you opened it. Review your code to ensure that you don’t open the same list item multiple times, work with a single SPListItem object instead.

Sometimes however it is necessary to open the same list item in parallel, as example if you want to perform an operation with elevated privileges on the item. If you take this approach you need to ensure that if you save one of the SPListItem objects, you need to reload all other SPListItems that point to the same actual item. Otherwise you’ll get the error above whenever you perform a change on the outdated items.

You can use the following utility method to ease the reloading of items:

        /// <summary>
        /// Reload a list item from scratch
        /// </summary>
        /// <param name="item">The list item</param>
        /// <remarks>
        /// Useful to avoid save conflicts
        /// </remarks>
        /// <returns></returns>
        public static SPListItem ReloadListItem(SPListItem item)
        {
            if (item == null)
                return null;

            return item.ParentList.GetItemByUniqueId(item.UniqueId);
        }
About these ads

9 Responses to “Sharepoint Error: Save Conflict Your changes conflict with those made concurrently by another user”


  1. 1 Amit Phule June 1, 2011 at 5:10 am

    Hi, this is a grate post.

    I have written a function to update a list item. it gives SAVE CONFLICT error many times because may be many users are using this function.

    How above solution make any difference? Because you are reading a list item again and going to update the same.

    Please provide more clarification.
    Thanks.

  2. 2 Nikola July 14, 2011 at 5:32 pm

    Great post this helped me alot with the Save Conflict errors in my custom workflow/

  3. 3 brsarruda January 26, 2012 at 6:48 pm

    Thank you so much, I just solved with this part..
    This happens whenever you try to save a SPListItem which has been modified since you opened it. Review your code to ensure that you don’t open the same list item multiple times, work with a single SPListItem object instead.

    I inserted a submit data into the form load, then I removed, and it’s works without code behind…just review to avoid if open the list many time…

  4. 4 Mike September 7, 2012 at 3:43 pm

    Just what I needed THANKS!

  5. 5 Dave September 11, 2012 at 7:00 pm

    We get this message fequenetly when we are uploading a new document into a library. The only user of the library is the person uploading the new document. Any idea why we would get this message??

  6. 6 TroubleShotgun October 25, 2012 at 6:19 pm

    I’m having the same type of issue with multiple users. It’s unlikely that so many users are trying to work with list items concurrently. What type of components should I be looking for here, and where would I find them?

  7. 8 Heena March 27, 2014 at 11:56 am

    Thanks it works

  8. 9 barne397 June 7, 2014 at 12:07 am

    Thanks! Life saver


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s





Follow

Get every new post delivered to your Inbox.

%d bloggers like this: