NotesAgent.ServerName with consequences

NotesAgent.ServerName may not give you the server you expect!

In the properties for scheduling the agent, you can set on which server the agent shall run.

But from time to time you may want to trigger it manually.

If so, be careful when you use NotesAgent.ServerName, since it will give you the server name set in the agent property described above and not the server on which it was manually triggered.

To get the current server be sure to use NotesSession.CurrentDatabase.Server instead.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: