title: Prevent replication or save conflicts in XPages
body: <p>I am maintaining an XPage application that has started creating multiple replication or save conflict documents BEFORE the initial document is saved.  How can this be happening and how can it be prevented?</p>
  
  <p>Users create a Contract in XPages application and have not yet saved the document so no other user should be able to see it, but when they save anything from 3 to 10 duplicates are created.  It also appears to happen at random, that is at random times for random users.  When I go into the core Notes database I can see them in an example shown below.</p>
  
  <p><img src="https://i.stack.imgur.com/FSTme.jpg" alt="enter image description here"></p>
  
  <p>Here is the only refernce to a document datasource I can find.</p>
  
  <pre><code>&lt;xp:this.data&gt;
     &lt;xp:dominoDocument var="document1" formName="Contract"   computeWithForm="both"&gt;
        &lt;xp:this.postSaveDocument&gt;
            ...........
        &lt;/xp:this.postSaveDocument&gt;
     &lt;/xp:dominoDocument&gt;
  &lt;/xp:this.data&gt;
  </code></pre>