Problem solve Get help with specific problems with your technologies, process and projects.

Use DXL utilities for advanced replication settings in Notes

Learn how you can build a note collection and use DXL utilities and LotusScript to set advanced replication settings.

How can I use LotusScript to automatically adjust advanced replication settings that activate when Lotus Notes users click on a button in an email?
LotusScript hasn't been exposed to advanced replication settings. In theory, you should be able to do this using the Domino Extensible Language (DXL) utilities. You can use DXLexporter to write the required settings to a file and modify the file (either manually or programmatically, depending on your needs). Next, you would use DXLImporter to load the results into the target database. DXLexporter and DXLimporter, but one thing that isn't immediately obvious is that you must also build a NoteCollection. A NoteCollection lets you specify what to export, so you can set "SelectReplicationFormulas," "SelectAllAdminNotes," or "SelectionFormula" to specify the exact settings that you want to use. To build such a note collection and export it to DXL, use a command similar to:
  Dim session As New NotesSession
  Dim db As NotesDatabase
  Set db = session.CurrentDatabase
  Dim stream As NotesStream
  Set stream = session.CreateStream

  Dim filename as string
 Filename = "C:\"+db.title+".dxl"
  If stream.Open(filename) Then
  Dim nc As NotesNoteCollection
Set nc = db.CreateNoteCollection(False)
nc.SelectReplicationFormulas = True
Call nc.BuildCollection
  Dim exporter As NotesDXLExporter
Set exporter = session.CreateDXLExporter(nc, stream)
Call exporter.Process
  End If

Do you have comments on this Ask the Expert Q&A? Let us know.

Related information from SearchDomino.com:

  • Featured Topic: Domino Extensible Language (DXL)
  • Crash Course: Lotus Notes Domino replication primer
  • Crash Course: LotusScript tips and tutorials
  • Reference Center: LotusScript
  • Reference Center: Lotus Notes Domino Replication and Synchronization
  • Dig Deeper on LotusScript

    Have a question for an expert?

    Please add a title for your question

    Get answers from a TechTarget expert on whatever's puzzling you.

    You will be able to add details on the next page.

    Start the conversation

    Send me notifications when other members comment.

    Please create a username to comment.




    • 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 ...