.

HCLSoftware Business Partner
Domino Consulting Services
CRUCIAL Notes Tools
+1 212-599-2048

Domino Consulting Services
CRUCIAL Notes Tools
Domino administration
Notes development

Facebook Twitter YouTube
Chat now       
.
ProductsDownloadsNewsAbout usContact


Need a Domino Consultant? Call NotesMail +1 212-599-2048 - HCLSoftware Business Partner

LOTUSSCRIPT/COM/OLE CLASSES


Examples: OnBehalfOf property
This agent sends mail with ownership and user information, including on whose behalf the agent runs.

Sub Initialize
 Dim session As New NotesSession
 Dim agent As NotesAgent
 Dim db As NotesDatabase
 Dim doc As NotesDocument
 Dim body As NotesRichTextItem
 Set agent = session.CurrentAgent
 Set db = session.CurrentDatabase
 Set doc = New NotesDocument( db )
 doc.Form = "Memo"
 doc.SendTo = session.EffectiveUserName
 doc.Subject = "Owner, user, effective user, on behalf of"
 Set body = New NotesRichTextItem(doc, "Body")
 Call body.AppendText("Owner = " & agent.Owner)
 Call body.AddNewLine(1)
 Call body.AppendText("User = " & session.UserName)
 Call body.AddNewLine(1)
 Call body.AppendText("Effective user = " & _
 session.EffectiveUserName)
 Call body.AddNewLine(1)
 Call body.AppendText("OnBehalfOf = " & agent.OnBehalfOf)
 Call doc.Send( False )
End Sub

See Also