ServerName (NotesAgent - LotusScript®)

Read-write. The name of the server on which an agent is set to run. This is a property of the design element, not of the current run of the agent.

Defined in

NotesAgent

Data type

String

Syntax

To get: server$ = notesAgent .ServerName

To set: notesAgent .ServerName = server$

Usage

The value of this property is:

Empty string if the agent is not a type that runs on a server, or if the agent is set to 'Choose server when enabled'.

Asterisk (*) if the agent is to run on any server or local replica.

A server name in canonical format if the agent is set to run on a specific server.

A Notes® username if the agent is set to run in background in a specific local replica.

If you change this property, you must call the NotesAgentSave method to commit the change to disk. You must have the appropriate access privileges to the database and to the agent.

Do not use this method during the run of an agent to tell what server the agent is running on. Instead use NotesSession.Username.

Related information

Accessing agents

Triggering an agent on a schedule

Example