EXPERT RESPONSE
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
|