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:
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.
Meet all of our Domino experts
View all Domino questions and answers
Start the conversation
0 comments