0

If You have item with attachment, then open attachment in new tab and edit it - Your Edit form will not be saved.

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.

I created my own button that uploads attachments and then refreshes page, but You can reproduce this behaviour in out-out-the-box lists too

Here guys changed "Unprotected" setting but I don't see it. https://social.technet.microsoft.com/Forums/en-US/dd1a1437-769c-4fc3-9346-4cdcbbb3289c/save-conflict-when-editing-or-uploading-attachments-to-list-item?forum=sharepointgeneralprevious

Also I have idea to turn On "Unsafe Updates", not sure I can do it in SpOnline2013..

Any ideas how to avoid it?

upd.: can I reload attachments on PreSave or something similar?.. I use JSOM, REST

upd2.: tried to update item in PreSaveAction, but get same error (tha't Ok, I really made a save conflict). But how to allow to change attachments from Edit form..

function PreSaveAction() {
// Get current iten and list ID
JSRequest.EnsureSetup();
var itemId = JSRequest.QueryString["ID"];
var listId = _spPageContextInfo.pageListId;

// Update current item
var context = SP.ClientContext.get_current();
var web = context.get_web();
var list = context.get_web().get_lists().getById(listId);
var item = list.getItemById(itemId);
item.update();

context.executeQueryAsync(function() {
console.log("Item updated successfully");
}, function() {
console.log("Error updating item");
});

// delay here
// ..
return true;
}
0

Try to open attachment in current tab by removing target="_blank" attribute to your links(anchor tags)

Open attachment in Microsoft Web App by appending ?Web=1 at the end of attachment Url.

var newAttachmentUrl = oldAttachmentUrl + "?Web=1";
  • Hi Jain! If I open attachment on current window I loose all changes from form. I think no matter how You open attachment - if file changes there will be "Save Conflict". – Gennady G Mar 23 '17 at 11:23
  • Have tried open in web app – Jain Abhishek Mar 23 '17 at 11:39
  • Yes I tried to copy-paste attachment url and add Your key, same result – Gennady G Mar 23 '17 at 11:49
  • Thank You Jain, I've googled these pages. My problem is with out-of-the-box lists and out-of-the-box attachments – Gennady G Mar 23 '17 at 12:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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