Hab noch was gefunden:
Is there a programmatic way to ensure that a Notes client pulls down a policy? Is there a way to ensure that DCC runs programmatically?
Solution
Yes. If implemented programmatically, this is best done by attaching the code below to a button and sending it in an e-mail to each user.
The code below accomplishes the following:
1. Removes all documents in the hidden $Policies view in the personal Names & Address Book (NAB).
2. Removes the local calendar profile.
3. Sets the AcceptUpdates = 1 in the current Location Document.
NOTE: The code below is a sample script, provided to illustrate one way to approach this issue. It is to be used as is and at your own risk. In order for this example to perform as intended, the script must be laid out exactly as indicated below. Product Support cannot customize this script for specific environments or applications.
LotusScript
Sub Click(Source As Button)
Dim s As New notessession
Dim db As NotesDatabase
Dim currdb As NotesDatabase
Dim calprofdoc As NotesDocument
Dim locationdoc As NotesDocument
Dim policiesview As NotesView
Dim locationview As NotesView
Dim nviewentcoll As NotesViewEntryCollection
'remove calendar profile
Set currdb = s.CurrentDatabase
Set calprofdoc = currdb.GetProfileDocument("CalendarProfile")
Call calprofdoc.Remove(True)
' removes all entries from $Policies view
Set db = s.GetDatabase("","names.nsf")
Set policiesview = db.GetView("$Policies")
Set nviewentcoll = policiesview.AllEntries
Call nviewentcoll.RemoveAll(True)
'update Current location document and set the AcceptUpdates = 2
'grabbing current location document from ini file
Dim location As String
location = s.GetEnvironmentString("Location", True)
location = Strleft (location, ",")
Dim locationname As Variant
Set locationview = db.GetView("Adva_nced\Locations")
Set locationdoc = locationview.GetFirstDocument
While Not (locationdoc Is Nothing)
locationname = locationdoc.GetItemValue("Name")
If Strcompare(location, locationname(0)) = 0 Then
'setting the value to 1
Call locationdoc.ReplaceItemValue("AcceptUpdates","1")
Call locationdoc.Save(True,True)
End If
Set locationdoc = locationview.GetNextDocument(locationdoc)
Wend
End Sub