I have SharePoint Document library in which there is InfoPath form. There is one event receiver which works on Item Added event. Version setting for the library is "Create a major version". When I change anything in the form, instead of creating its version, it is creating a new form in the library with the same property except the change. Am I missing anything in settings ?

  • the old document and the new document created after change have the same name? – Trimantra Software Solution Dec 12 '16 at 6:06
  • No, new document have different Id. Actually I am renaming the name of Infopath file by event receiver. – Prasad Gavande Dec 12 '16 at 6:13
  • have you checked versioning setings fro document library. – Rahul Dayal Dec 12 '16 at 6:27
  • versioning settings is same as given by Trimantra Software in answer below – Prasad Gavande Dec 12 '16 at 6:42

The issue with you is that here a new document is uploaded so its not maintaining the versions.

When I was having the same requirement I have achieved this without having event receiver. I followed

  1. On load of the InfoPath form I stored the current name of the document in the hidden control on InfoPath.
  2. In the submit rule I have used the name of the document stored in the hidden control. And due to this I was able to generate the versioning of the documents and new document was not created.

You can try with this approach once, it solved the requirement.

Also verify once following versioning setting:

enter image description here

  • Other library with same logic is working fine. Only my current library having this issue. Why ? I may missed some version settings or anything else. – Prasad Gavande Dec 12 '16 at 6:22
  • As mentioned in question you have already changed the setting of versioning to "Create a major version". Right? – Trimantra Software Solution Dec 12 '16 at 6:26
  • Yes, I checked with other working library, versioning settings are same there. – Prasad Gavande Dec 12 '16 at 6:27
  • Is there anything, which controls creating files on version change? – Prasad Gavande Dec 12 '16 at 6:28
  • Yes, I have same settings as you added in image. – Prasad Gavande Dec 12 '16 at 6:29

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.