I have 2 databases : let say dbA and dbB. Actually, dbB is a ''child'' database of dbA, because the forms/views/frameset/etc that it contains they all are also in dbA.
I want now, to copy from a view ( let say vwA ) from dbA some 8K docs to the same view ( vwA ) from dbB. THese 8k contains both parent and child docs, which in dbA are listing OK, with @Text(@UniqueDocumentID). I just made a test, copy one parent doc and its response, and pasted in the 2nd database, but unfortunately the connection between the 2 docs isn't made... I guess the UNID had changed...
Is there any solutions? Thanks for your time.
Or, you could let replication handle this for you by setting a replication formula, assuming that dbA and dbB are replicas.
Yes, copying a document to another database always creates a new UniversalIDs for document in target database.
To avoid this, your LotusScript should work like this:
CopyAllItems
from source document to target documenttargetDoc.UniversalID = sourceDoc.UniversalID
This way the target document has the same UniversalID like the source document and links between document should work in target database too.
This is an example for an agent working on selected documents:
I think the easiest way is creating a script and copiing the documents using the CopyToDatabase method of NotesDocument class. The CopyToDatabase method retains the UniversalID of documents (for perfomance reasons). This is true at least for Versions up to R7.
More information can be found here: IBM Technote: Documents copied using CopyToDatabase method reuse same UNID
A sample Script (copied and modified from Knut) would be: