Lotus Notes / Domino 10 > ND10: Administration & Userprobleme

Policy per Script auf Client sofort neu laden

<< < (2/2)

Ice-Tee:
Hallo, ist es auch möglich den Part "Löschen des Kalenderprofils" rauszunehmen? Oder muss der drin bleiben?
Das würde dann so aussehen.

###

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

'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("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

###

Navigation

[0] Themen-Index

[*] Vorherige Sete

Zur normalen Ansicht wechseln