2
votes

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?

2

2 Answers

1
votes

Found it: NotesSession.CurrentDatabase.Server

clem

0
votes

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