I need to capture which server an agent is running on. When the agent is a scheduled agent, I can use property NotesAgent.ServerName. But when the agent is executed from a url, 'ServerName' is blank. Is it possible to get the server name?
You can access the Server property of the NotesDatabase class, like this:
Dim session As New NotesSession
Dim db As NotesDatabase
Dim ag As NotesAgent
Set db = session.Currentdatabase
Set ag = session.Currentagent
If ag.Iswebagent then
MsgBox db.server
End if
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more