But one major annoyance of the implementation of Domino policies is that it is very unpredictable when the notes client will refresh his policies from the server. Especially in test environments you restart your clients often only to see that your changes on Policies are still not pushed to your test client. Or something in your client goes wrong and policies will not be updated anymore. So i have created a small lotus script program to delete the local cache of the policies and refresh all policies from the server which you can put in the click event of a button.
Sub Click(Source As Button)
Dim s As New NotesSession
Call s.SetEnvironmentVar("PoliciesLocalViewModTime","",True)
Forall db In s.AddressBooks
Call db.open("", "") ' Must open database
'Refresh Policies View on Server
If db.IsPublicAddressBook Then
Set view=db.getView("($Policies)")
view.refresh
Set view=db.getView("($PoliciesExt)")
If Not view Is Nothing Then
view.refresh
End If
End If
'Remove all policydocuments on the local client
If db.isPrivateAddressBook And db.server="" Then
Set view=db.getView("($Policies)")
Set doc=view.getFirstDocument
view.autoupdate=False
While Not doc Is Nothing
Set tempdoc=doc
Set doc=view.getNextDocument(doc)
tempdoc.remove(True)
Wend
view.autoupdate=True
view.refresh
End If
End Forall
'Run Dynamic client configuration to repopulate the local policy view
Set s=Nothing
result=Shell ("ndyncfg.exe ""1""",1)
End Sub
I have tried this code in our Domino 8.5.3 environment. If you have any problems please leave a comment.Have a look at my other postings relating policies


















