Manage Learn to apply best practices and optimize your operations.

Create Documents With Links From Another Document Without Relationship.

In my case, I received a request for a database that contains a form where a
user selects options in preparation for a customer visit. Once approved, the
assistant processing the request clicks on buttons that create additional
documents in other databases based upon the options selected, such as a
Catering Request or Room Reservation. The following code creates the document
and inserts a link in the original request for easy tracking. My original code
creates a document history and contains validation code, but here are the
basics to get you started.
Dim session As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim db As NotesDatabase
Dim uidoc As NotesUIDocument
Dim new_uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim new_doc As NotesDocument
Dim rtitem As NotesRichTextItem
Dim user, process As String

Set db = session.CurrentDatabase
Set uidoc = workspace.CurrentDocument
Set doc = uidoc.Document
Set rtitem = New NotesRichTextItem( doc, "Link" ) '<&LTRich Text Field that
will contain the link.

uidoc.EditMode = True

Set new_uidoc = workspace.ComposeDocument( "Server Name", "Database Name",
"Form Name" )
Set new_doc = new_uidoc.Document
Call rtitem.AppendDocLink( new_doc, "Form Name" ) '<&LTDisplays form name
when cursor mouses over the link

Call new_uidoc.Save
Call uidoc.Save
Call doc.Save( True, False )

Dig Deeper on Lotus Notes Domino Administration Tools

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...