Appending class methods

This tip describes appending class methods using LotusScript.

Did you know that you can append one class method on to another? For example if you want to get the database title from an Action Button you need to declare the NotesSession then declare and set the database then get the title. Instead, you can go directly to the database title from the NotesSession.

dim session as New NotesSession
dim db as NotesDatabase
set db = session.CurrentDatabase
dim dbtitle as string
dbtitle = db.Title
Dim session As New NotesSession
dim dbtitle as string
dbtitle = session.CurrentDatabase.Title

Likewise, if a document has a field called 
"Approver", it can be accessed by this code:
Dim ws As New NotesUIWorkspace
Dim tmp As String
Dim uidoc As NotesUiDocument
set uidoc =  ws.CurrentDocument
tmp = uidoc.FieldGetText("Approver")
or get reduced to:
Dim ws As New NotesUIWorkspace
Dim tmp As String
tmp = ws.CurrentDocument.Document.Approver(0)

Dig Deeper on LotusScript

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 ...