RNUG Lotus User Group (www.vlaad.lv)

How to Sync address book and iNotes contacts automatically for all users

Vladislavs Tatarincevs  11 February 2009 19:21:28
Some weeks ago, we were doing Exchange->Domino migration with my colleague,
All migrated contact were stored in mail file, we need to make them sync with local names.nsf

There is a check box in replication tab
Image:How to Sync address book and iNotes contacts automatically for all users
you can enable it in preferences
But what to do if you need this for 300 users? or 1000?
Image:How to Sync address book and iNotes contacts automatically for all users

I have found where this check box is stored, (local names.nsf), but I was unable to enable this check with LotusScript.

Then I remembered the KISS, KEEP IT SIMPLE, STUPID. Let's do not make complex things.

I wrote and agent, which is triggered on mail file dbClose event.
I used registration class, because it can be stored also in other databases, like help desk, or somethink.
you can modify it and use
Session CurrentDatabase.

If you place this script in QueryDatabaseClose event, it will sync you contacts.

Vlad



Const server="DOMINO/Organization"
 Dim session As New NotesSession
 Dim reg As New NotesRegistration
 Dim mailfile As String
 reg.RegistrationServer = server
 Call reg.GetUserInfo( session.UserName, ,  mailfile, , , )
 Dim db As New NotesDatabase( server, mailfile )
 
 Dim agent As NotesAgent
 Set agent = db.GetAgent("(Synchronize Address Book)")
 If agent.Run = 0 Then
  Print "Agent ran",, "Success"
 Else
  Print "Agent did not run",, "Failure"
 End If
End Sub


Comments

1David Price  11/02/2009 19:15:14  How to Sync address book and iNotes contacts automatically for all users

One issue to be aware of is if the total number of contacts is large (>1,000), it can cause a significant delay. I added in some logic to check the total number and add a pop-up asking if they want to do. Obviously this allows the user to bypass but the complaints about delays in shutting down.


Discussion for this entry is now closed.

Archives