Solved

Copying documents to other DB without changing the it's UNID

Posted on 2002-04-24
4
468 Views
Last Modified: 2013-12-18
hi all,

aside from using the "copy to database" in a simple action agent to copy document to other database, is there any other way to do so without changing the document's UNID?

regards  
0
Comment
Question by:cezarF
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 9

Expert Comment

by:Arunkumar
ID: 6965297
Making a replica copy and replicating the documents too would give you the same result.

Copy to Database is the best option for selected documents.  It not only preserves the document UNID but also the created date.

The feature that you can misuse !!! haa haa haa !!!

Have Fun!
Arun.

0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 6965670
You can do it by using lotus script too !
Do you want the code for it ?

~Hemanth
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 100 total points
ID: 6965708
And here is the code for the agent.

Sub Initialize
     Dim s As New NotesSession
     Dim db, tdb As NotesDatabase
     Dim coll As NotesDocumentCollection
     Dim doc, cDoc As NotesDocument
     Set db = s.CurrentDatabase
     Server = db.Server   'target server
     FilePath = "**********target Database Path********"
     Set tdb = New NotesDatabase(Server,FilePath)     ' TargetDatabase
     Set coll = db.UnprocessedDocuments
     Set doc = coll.GetFirstDocument
     While Not doc Is Nothing
          Gosub CopyToTargetDB
          Set doc = coll.GetNextDocument(doc)
     Wend
     Exit Sub
CopyToTargetDB:
     Set cDoc = tdb.CreateDocument
     Call doc.CopyAllItems(cDoc)
     cDoc.UniversalID = doc.UniversalID
     Call cDoc.Save(True,False)
     Return
End Sub
0
 
LVL 14

Author Comment

by:cezarF
ID: 6967388
Thanks Arun!

HemanthaKumar,

Really!? I thought UniversalID is a read-only property. I'll give it a try and get back to you as soon as i can.

regards!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question