Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2002-04-24
4
Medium Priority
?
499 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 400 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

Technology Partners: 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

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

772 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