There are several ways to run an agent in Lotus iNotes.
Results of an agent can be put into a NotesVar:
= the name of your agent
= location of agent (default = 0):
0 = user's mail file
1 = Forms file
2 = Extension Forms file (available starting in 8.5.2)
An agent can insert content directly into the HTML of a page. This agent writes out <option> tags:
You can use an XHR request to execute an agent using a URL like this:
Note that agents run like this must be in the Forms file. Starting in 8.5.2, there is another preset field you can use:
loc = location of agent. The values are the same as above. The default is 1.
- Set the agent's target to: NONE.
- Enable the "Run as web user" checkbox on the second tab.
- Open your Domino Server document in the names.nsf database.
- On the Security tab, set the following field to include your canonical name: "Run unrestricted methods and operations. " By adding your name to the list, you allow any WebAgents created by you to run on this Domino server.
In the agent:
- MessageBox statements will write text to the server console
- Print statements will write text to be returned to the browser