Solved

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

Posted on 2002-04-24
4
459 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
  • 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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

803 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