I have a method to call ItemAdding and in this method I call another method. This other method creates a number for the item that was added.

However, if two people call this code at the same time, User A will get a number and User B will submit at the same time eliminating User A's data and User B won't get a number created.

Is there any way to keep SharePoint from updating to XML files at the same time in a workflow?

  • Can you please update your question and include the code you are referring to?
    – Phil Greer
    Aug 27, 2014 at 16:23

1 Answer 1


Yes add the XML document to the document library and check out when someone is editing, it will prevent the other one editing. That way you can check the form logic depending on the xml is checked out or not.

Another is adding a web property and make note someone is editing there with a property and then allow editing depend on the property.

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.