LotusScript agent automates selective mail file replication

You can use selective replication to replicate sets of documents in a Notes/Domino database. But what if you need to replicate several Notes/Domino databases? Get the steps and LotusScript agent to set a replication formula for multiple mail files.

This Content Component encountered an error

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. Enter the Name, Trigger, Schedule and Target for the agent.
  5. 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.

  6. Select LotusScript for the Action type.
  7. 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

Dig deeper on LotusScript

0 comments

Oldest 

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:

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchDataCenter

SearchExchange

SearchContentManagement

Close