Solved

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

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

624 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