Reputation: 1921
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?
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.
Here is the only refernce to a document datasource I can find.
<xp:this.data>
<xp:dominoDocument var="document1" formName="Contract" computeWithForm="both">
<xp:this.postSaveDocument>
...........
</xp:this.postSaveDocument>
</xp:dominoDocument>
</xp:this.data>
Upvotes: 0
Views: 1239
Reputation: 15729
The most typical way multiple save conflicts are created for new documents is if the XPage has multiple dominoDocument datasources on the page and using a Button of type Submit or using the Save Data Sources simple action.
If datasources do not have ignoreRequestParams="true", all data sources are editing the same document, regardless of any other properties defined for the individual datasources.
The Save Data Sources simple action, as its name implies, saves all datasources on the page. However, a button of type Submit will submit the form, which tells the server to also save all datasources, not necessarily restrict functionality to any SSJS defined in the event.
Upvotes: 3