LotusScript agent automates selective mail file replication

Selective replication means that you only need to replicate a set of documents within a Notes/Domino database, instead of all of them. To activate selective replication, you can use Documents by selection formula in the Advanced tab of the Replication Settings dialog box. However, manually implementing this feature for several databases can be cumbersome.

This LotusScript agent automates the task using the NotesReplicationEntry class. Following are the steps needed to create the agent and an example showing how an agent was used to set a replication formula for multiple mail files.

Follow these steps to create the LoutsScript agent:

  1. Open the mail template file on the Domino server. You can also use a copy of the mail file template.
  2. Open the template with Domino Designer.
  3. Select Click-> Create -> Design -> Agent.
  4. Related resources from SearchDomino.com:
    Avoid replication issues when editing Lotus Notes response documents

    More efficient local Lotus Notes database replication
  5. Enter the Name, Trigger, Schedule and Target for the agent.
  6. Note: Schedule the agent so that it will run after the design of all of the mail files has been converted to the new changes on the mail template file.

  7. Select LotusScript for the Action type.
  8. Select Initialize object and enter the following LotusScript code. This will set a Selective Replication by date, for example, Documents starting from January 1, 2009.

LotusScript to set selective replication formula
(Click on code for enlarged view and script download.)

Signing the Notes/Domino mail template

To sign the agent with the server ID, perform the following steps:

  1. Use the Domino Administrator to open the server.
  2. Go to the Files tab and select Templates only under Show me.
  3. Select the mail template file.
  4. Go to Files -> Sign -> and select Active Server's ID.
  5. On the server console, issue the command:
    Tell adminp process all

This will force AdminP to immediately administer this request.

Once the agent has been created, scheduled and signed on the mail template file, replace the design of the mail files using the convert task:

load convert [mail_folder_name]/  
*  [mail_file_template_name]

After the design conversion task completes, the agent will run on all mail files according to the set agent schedule will set the selective replication formula on all mail files.

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip library by member Bruck Sewnet. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes/Domino technical tip or code snippet to share? Submit it to our monthly tip contest and you could win a prize.

This was first published in April 2009

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.