Save a script in a database

 

After choosing a script template and setting the options as required, the script window shows the automatically generated script. In most cases this script can be integrated into the database without additional adjustments. The script can be integrated in a Notes database by:

 

using "copy and paste" place the script in the database (i.e. in a script library).

 

1. Select the entire script via the script window or via the context menu:

clip0012

 

2. Click "copy" in the context menu:

clip0013

 

go to "save in database" directly via the context menu in the script wizard.

 

1. Click

 

2. In the window below you can select, whether to create a script library or an agent:

 

clip0014

 

3. Select the desired name and click "save"

 

Note: When creating an agent, ensure that the option "AgentInitialize" is activated. This creates an initialisation section in the script which calls the main function.

 

Note: An agent that was automatically created has the following options:

Trigger = On event

Target = All selected documents

 

Note: Be sure to refresh the database before trying to execute a newly saved script. You can create an agent and execute it directly from the script wizard without the need to start the Notes client. Use the "Save agent and execute" button:

 

clip0015

 

In this case, a background agent is created (with target = All documents in database).