Opening a document in another database

Hello,

We have a number of databases which we are trying to interconnect.

I am having difficulty figuring out how to take a UID in the current database, and using it to open that document in the second database.

For example, we have the information, including the UID, and we find that we want to look at that document or change something in the other database, we could simply hit a button in the current form or view, and it would open up. If someone could help me with this, I would very much appreciate it.

Thank you

Subject: Opening a document in another database

This is code from a summary document in the current database which uses the UNID to open a document in another database (dbSU).

Sub Postopen(Source As Notesuidocument)

Dim session As New NotesSession

Dim workspace As New NotesUIWorkspace

Dim dbCurrent As NotesDatabase

Dim doc As NotesDocument

Dim dbSU As NotesDatabase

Dim uidocSU As NotesUIDocument

Dim view As NotesView



Set dbCurrent = session.CurrentDatabase

Dim ServerName As New NotesName(dbCurrent.Server)



Set source = workspace.CurrentDocument

Set dbSU = session.GetDatabase(ServerName.common,gDbPathSpecLifts)



Set doc = dbSU.GetDocumentByUNID(source.FieldGetText("ParentUNID"))		



Doc.Form = "Uplift Request"	

Set uidocSU = workspace.EditDocument(False,Doc)



Call source.Close

End Sub

This should give you some ideas.

Alex