mtshipp
asked on
Automation of Replication Setting
I have a need to check and modify the setting of the "Do Not Send Deletions Made In This Replica To Other Replicas" on nearly 1,200 Lotus Notes R6 accounts.
Obviously automating it would be the way to go so I downloaded the API Toolkit from IBM and created an application to make the change but it appears that the one function I need to use (LNDatabase:SetReplicateSe ndDeletion s) has a bug and will not work.
Does anyone have ideas how to make the changes to all users to have this option unchecked? I need to be able to uncheck it if checked or leave it alone if not.
Obviously automating it would be the way to go so I downloaded the API Toolkit from IBM and created an application to make the change but it appears that the one function I need to use (LNDatabase:SetReplicateSe
Does anyone have ideas how to make the changes to all users to have this option unchecked? I need to be able to uncheck it if checked or leave it alone if not.
mtshipp,
oh sorry, I meant you need to disable.
To uncheck it if checked or leave it alone if not:
Dim session As New NotesSession
Dim db As NotesDatabase
Dim rep As NotesReplication
Set db = session.CurrentDatabase
Set rep = db.ReplicationInfo
If rep.Disabled Then rep.Disabled = False
Call rep.Save()
Hope this helps,
Marko
oh sorry, I meant you need to disable.
To uncheck it if checked or leave it alone if not:
Dim session As New NotesSession
Dim db As NotesDatabase
Dim rep As NotesReplication
Set db = session.CurrentDatabase
Set rep = db.ReplicationInfo
If rep.Disabled Then rep.Disabled = False
Call rep.Save()
Hope this helps,
Marko
mtshipp,
are those by any chance user's mail databases?
Marko
are those by any chance user's mail databases?
Marko
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It is better to put the script above (once you assembled it correctly) in the PostOpen of the database, with the following logic:
if this is a local replica then
catch errors!
deselect send_deletions
end if
You need to catch errors, for the user who runs the code might not have sufficient permission to change the setting.
As a matter of fact, this might be a very big problem. You (with your privileges) cannot reach local replica's of a database to activate something. It must be the owner/user of the replica who activates the code. I wouldn't know if the user himself has sufficient rights to alter the setting you need. I hope so, but you'd better just try it.
if this is a local replica then
catch errors!
deselect send_deletions
end if
You need to catch errors, for the user who runs the code might not have sufficient permission to change the setting.
As a matter of fact, this might be a very big problem. You (with your privileges) cannot reach local replica's of a database to activate something. It must be the owner/user of the replica who activates the code. I wouldn't know if the user himself has sufficient rights to alter the setting you need. I hope so, but you'd better just try it.
ASKER
Thanks for the help but the
IgnoreDeletes and IgnoreDestDeletes
changes the value of the deletions setting in the Advanced Tab of the Replication settings. I need to modify the value of the "Do Not Send Deletions Made In This Replica To Other Replicas" setting on the Send Tab.
IgnoreDeletes and IgnoreDestDeletes
changes the value of the deletions setting in the Advanced Tab of the Replication settings. I need to modify the value of the "Do Not Send Deletions Made In This Replica To Other Replicas" setting on the Send Tab.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Seems good to me... I'd add an <On Error Goto 0> and I'd remove the last Exit Sub, but that's more esthetics.
you need to call this on all dbs you want disabled for replication:
Dim session As New NotesSession
Dim db As NotesDatabase
Dim rep As NotesReplication
Set db = session.CurrentDatabase
Set rep = db.ReplicationInfo
rep.Disabled = True
Call rep.Save()
Hope this helps,
Marko