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

Creating a Lotus Notes Personal Address Book replica

SearchDomino.com LotusScript expert Cregg Hardwick explains how to create a Lotus Notes Personal Address Book replica, add an icon for it on the Notes Workspace and add it to the Replica tab.

I am creating a server replica of a Lotus Notes user's Personal Address Book using LotusScript. How do I add the icon to the Replication tab? This does not happen when the replica is created. Is it possible to modify the Replica tab via LotusScript?

I am not aware of any programmatic way to modify the Replica tab, and I'm certain that this would be a bad idea even if you could do it. Fortunately, it's not needed.

What you have to understand is that the replica tab is function of the Notes Workspace, exposed through the NotesUIworkspace object. Creating a replica of a local database does not update the Replica tab, because it does not add an icon to the workspace the way creating a replica through the UI would do.

Lotus Notes databases only appear on the replicator page when you have icons on your workspace for a local copy and a server copy of the same database. But the AddDatabase method of NotesUIworkspace does, so the following code will create a replica, add an icon for it to your workspace, and incidentally add it to the Replica tab:

Dim ws As New NotesUIWorkspace
Dim session As New NotesSession
Dim pab As New NotesDatabase("","names.nsf")

Call pab.CreateReplica("Dev001","lncenter\MyPab.nsf")
Call ws.AddDatabase("Dev001","lncenter\myPab.nsf")

This assumes that you already have an icon for the local replica. If not, you'll have to add it first, by passing the null string ("") to the server parameter of AddDatabase.

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

Related information from SearchDomino.com:

  • Learning Guide: LotusScript
  • FAQ: LotusScript
  • FAQ: Address book and directory management
  • Reference Center: LotusScript tips and resources
  • 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 ...