例: LockHolders property (NotesAgent - LotusScript®)

次のビューエージェントは、「Main Agent」というエージェントのロック所有者を表示します。

Sub Initialize
  Dim session As New NotesSession
  Dim db As NotesDatabase
  Set db = session.CurrentDatabase
  
  REM Exit if locking is not enabled
  If Not db.IsDesignLockingEnabled Then
    Print "Design locking not enabled"
    Exit Sub
  End If
  
  REM Get agent
  Dim agent As NotesAgent
  Set agent = db.GetAgent("Main Agent")
  
  REM Display lock holders
  holders = agent.LockHolders
  If holders(0) = "" Then
    Messagebox "None",, "Lock holders"
  Else
    Forall h In holders
      msg$ = msg$ & h & Chr(13)
    End Forall
    Messagebox msg$,, "Lock holders"
  End If
End Sub