Using an agent to delete and archive documents

Agents give you a very high degree of control over document deletion criteria. However, agents can be slow to run.

The following procedure describes creating an agent using simple actions. You can also create agents using Notes® formulas, LotusScript®, or Java.

When you run the agent, if Domino® cannot copy all specified documents to an archive database -- for example, if there is not enough disk space on the target folder -- the agent stops.

For more information on Notes® formulas, LotusScript®, and Java see HCL Domino® Designer Help.

  1. (Optional) To archive deleted documents, select File > Application > New Copy to create a copy of the database as the archive copy. Copy only the database design.
  2. Open the database and select Create > Design > Agent.
  3. Type a name for the agent.
  4. For When should this agent run, click the arrow and select an option.
  5. For Which documents should it act on?, click the arrow and select an option. Click Add Search, specify the search criteria, then click OK.
  6. (Optional) To archive deleted documents, on the last pane next to Run, select Simple action(s) then click Add Action. Then select Copy to Database and select the archive copy of the database created in Step 1. Click OK and go to Step 8.
  7. In the last pane next to Run, select Simple action(s) then click Add Action. Then select Delete from Database.
  8. Close and save the agent. Then select View > Agents, select the agent and select Actions > Test to simulate a run and test that it works correctly.
  9. Save and close the agent if necessary.