Monday 15 August 2011

Lotus Notes 7 - copy / move docs. ( parent & response docs ) without changing the UNID ? -


I have 2 databases: DBA and DBB In fact, DBB is a DBA "child" database, because the form / Thoughts / frames-sets / etc in which they are included are also in all DBAs.

Now I want to copy one view from DBA to VVA for DBB (VVA) for the same view (VVA) with 8 V docs. These 8 include both parents and children , Which is included in the DBA @tex (@Unique DocumentEd) with the OEE Are listed. I have just done a test, have copied a parent dock and its response, and pasted it in another database, but unfortunately there is no connection between 2 docs ... I think the UNID has changed. .

Is there a solution? Thanks for your time.

Yes, copying a document into another database always creates a new universal ID for the document Target database

To avoid this, your LotusScript should work like this:

  • Create a new document in the target database
  • CopyAllItems target document from source document
  • Set the same UniversalID to target the document targetDoc.UniversalID = sourceDoc.UniversalID
  • Save the target document < / Li>

    Thus the target document has the same UniversalID as the source document and the document Links between Ejh should also work in the target database.

    This is an example for agents working on selected agents:

      Moderate session New NotesSession dim dbSource NotesDatabase dim dbTarget NotesDatabase dim col NotesDocumentCollection dim docSource NotesDocument dim docTarget NotesDocument Set the dbSource = session.CurrentDatabase set as in the form of the target as well as the target = session.Getdatabase (dbSource.Server, "YourTargetDatabase.nsf",) col = dbSource. Unprocesseddocuments set docSource = col.getfirstdocument () not docSource docTarget = dbTarget.Created document () calls while nothing is set docSource.Copyallitems (docT Arget, true) docTarget.UniversalID = docSource.UniversalID docTarget.save calls (true, false) set docSource = col.Getnextdocument (docSource) pass    

No comments:

Post a Comment