1

(This is a bit of a duplicate question but it was asked a year ago and it wasn't answered helpfully.)

I've got a form created against Office 365 Sharepoint custom list. Pretty much everything is working as expected but what I need is to be able to save a record, change only a couple of fields and then save it as a new record.

If you have an answer no need to read on but I've tried every combination of rules I could find (I think). And all that happens is that it overwrites the current record. Without going into every combination some of the obvious things I've tried:

  • Submit but leave form open but entering new data just overwrites.
  • Rules - most every combination of submitting and then querying, switching to edit item view, send data to webpart (I don't think this actually does anything)...
  • Tried the above in most any order.

What does work is saving and opening a new form but that resets the data. I've done tons of searches and researching but can't seem to come up with a good answer.

Any ideas greatly appreciated.

1

This is just how SharePoint and InfoPath work together. It is also not different from the behaviour of the list form that comes out of the box with a SharePoint list.

When a form is opened, it is tied to the record that it displays. The form can only change that item. To release the item, the form needs to be closed.

Maybe you need to step back from the idea of using a form and consider other options to achieve what you need to do. If you want to quickly duplicate list items with only few differences between each item, you may want to use the datasheet view to copy and paste an existing item into a new item and then edit the new item.

0
1

We had a similar situation and we solve it by adding new command to the ribbon. Basically, the user selects the item and press a choise named: New record. The button copies the current item's data to a new one and opens the new item. We followed code in https://patrickboom.wordpress.com/tag/ecma-script/

Another solution is to add a field named "this is a new record" and use an event receiver - a remote event receiver in your case. Then, you have two options:

a) You create an event receiver on item updating and you create the new item (based on afterproperies) and then you CANCEL the updating!!!. Yes, I know it will show an error, but YOU set the error message - which could be: The new record has been added. More https://stackoverflow.com/questions/1511281/sharepoint-event-receiver-item-adding Don't forget to set "this is a new record" = false - you don't want the event receiver to do staff for the new record. Or, you can set it to itemupdated and recreate the old item - more info in which is better for you in : http://www.sharepointalex.co.uk/index.php/2010/06/beforepropertiesafterproperties-in-event-receivers-i-always-forget-this/

b)Add versioning! In that case, in itemupdated, if the "this is a new record" field is true, you create a new item (which is actually the old one) , based on the most previous version!

It requires developing skills, but it's an idea out of the box.

1
  • For the ribbon, I'll send you links tomorrow, where I'll be at work. You create a new version by enable versioning in library. For event receiver, youtube.com/watch?v=k2BJxgKemoI . All my solution include developing code.
    – XristosK
    Sep 7 '14 at 21:23

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.