- This script displays the name of every manager in the current
database. For example, it might display "Helen Anda," "LocalDomainServers,"
and "Sales."
Dim session As New NotesSession
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Forall m In db.Managers
Messagebox( m )
End Forall
- This action script prompts a user for a suggestion and then mails
the suggestion to the managers of the current database.
Sub Click(Source As Button)
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Set db = session.CurrentDatabase
Set doc = New NotesDocument( db )
doc.Form = "Memo"
doc.Subject = "Suggestion for "+ db.Title
doc.Body = Inputbox$ _
( "Please enter your suggestion: ", db.Title )
Call doc.Send( False, db.Managers )
End Sub
- An application consists of two databases that work together. This
script finds all the managers of the first database and assigns them
manager access to the second database. (The script must have manager
access to the second database in order for the script to run).
Dim db1 As New NotesDatabase _
( "Key West", "cserv\datadict.nsf" )
Dim db2 As New NotesDatabase _
( "Key West", "cserv\calltrak.nsf" )
Forall mgr In db1.Managers
Call db2.GrantAccess( mgr, ACLLEVEL_MANAGER )
End Forall