Link to home
Start Free TrialLog in
Avatar of sprice205
sprice205Flag for United States of America

asked on

Lotus Notes--Save of Document Produces Dupe

The Problem:

I have a database that suddenly has begun producing duplications of documents whenever the user saves it.   There is no query- or postsave event coding, and this has seemingly just begun out of nowhere; as well, it is happenly consistently.  

Interestingly, this has also cropped up in another database, but only happens intermittently, and I cannot find a common thread amongst those documents which get duplicated.  

All affected forms have the Conflict Handling property set to "Create Conflict".

Thanks to all who respond.
Avatar of mbonaci
mbonaci
Flag of Croatia image

Are any other document events coded (e.g. QueryClose).
Any subforms (their events).

Are the documents just plain copy (like you copied it on the view) or they are in some kind of parent-child relationship?
Also check on form's properties, first tab, versioning.
Also, the code can be in view events...
Avatar of Sjef Bosman
Are those document indicated as Replication or Save Conflicts? Or are they just duplicates?
Avatar of sprice205

ASKER

I'm sorry not to have gotten back to anyone before now.
mbonaci: No subforms, no other event coding, and they show up as same-level dupes, no parent-child relationship.  As well, no view events.
sjef_bosman: You may be onto something, as often a replication conflict occurs for these documents before the dupe is created.  
Thank you both for your responses.
 
 
ASKER CERTIFIED SOLUTION
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I hope you left UpdatedBy and Revisions fields setting intact.

Check $UpdatedBy field in correlation with $Revisions field (of duplicates) to find out who last saved the doc and when did it happen.
Then you'll, hopefully, know whether it's an agent (developer who last saved the agent or server name would then be in $UpdatedBy field) or it's someone saving the docs manually...

Also, do you have some kind of relation (not parent/child, but ID or similar) between different types of docs?
It can be that some other doc refreshes the values in conflict doc upon saving/closing.


Hope this helps,
Mb¤
Avatar of tiler
tiler

This sounds like the form might contain some LotusScript code that saves the document using NotesDocument.Save instead of NotesUIDocument.Save. That doesn't account for everything you're seeing, but that could account for creation of a replication/save conflict.
All:
I'm sorry not to have responded before now.  I spent quite a bit of time away very ill and have been playing catch up for months.
As it turns out, someone who works for me was going into the "Save/Rep Conflicts" view and just refreshing the documents.  This would cause the save/conflict docs to be stripped of the "$Conflict" field and then just remain there, but then it would not be a conflict doc, but rather just another duplicate document.  Apparently, he was watching this view quite conscientiously, so sometimes this "inexplicable and inconsistent" issue would happen quite a lot, and other times (when he was very busy or not present) not at all.  
I'd love to award points, as all who answered offered up so much good information, but...none were the actual solution.  
As I look closer, I see that sjef_bosman did, in fact, pose the actual solution, though suggesting (understandably) that it was happening as the result of an agent rather than someone doing the refresh manually.  My apologies for not noticing this, sjef, and for taking so long.  The points are yours
Thanks for checking again!! I'd never have expected this to be manual labour, because it is not of the more pleasant kind. Rather boring actually, and of course not the right way to go about these conflicts. I know many people practise the exact opposite way of handling them: they throw them away. Which is also not right.

It is better to include a tool to compare the original document and the conflict. Such a tool can be found in the Lotus Sandbox:
http://www-10.lotus.com/ldd/sandbox.nsf/ecc552f1ab6e46e4852568a90055c4cd/edfc0133033251df85256d9c00627ad7?OpenDocument
sjef:
That's a great tool that I didn't even know existed!  Thank you!