Martin Braeuer 1.Apr.04 08:52 AM Lotus Notes Applications development/customization3.1Windows 2000; Windows NT
Can anyone help please?
I want to change the Field AllEditorsFlag from true to false in all binders. The agent seems to work fine, but when I check this field in DomDoc it wasn't changed (But the message "Automatic Agent: AllReaders-Flag is set to false" was wrote to the log).
Set db = s.CurrentDatabase
Set theApi = CreateObject("DominoDoc.API")
Set docConfig = getConfigDoc (db.Server)
Set theLibrary = theApi.GetLibrary ("<my lib>")
Set theCabinets = theLibrary.Cabinets
For countCabinets = 0 To (theCabinets.Count - 1)
Set theCabinet = theCabinets.Item (countCabinets)
Set theBinders = theCabinet.Binders
For countBinders = 0 To (theBinders.Count - 1)
Set theBinder = theBinders.Item (countBinders)
flagToCheckOut = True
If theBinder.CheckedOutUserName <> "" Then flagToCheckOut = False
If theBinder.IsCabinetReadOnly Then flagToCheckOut = False
If flagToCheckOut Then
Call theBinder.SetToWorkingCopy
Set theSecurity = theBinder.Security
If Not theSecurity.IsSecured Then
Call theBinder.CheckIn (0, "")
Else
If theSecurity.AllEditorsFlag Then
theSecurity.AllEditorsFlag = False
Call theBinder.Save
Call theBinder.CheckIn (2, "Automatic Agent: AllReaders-Flag is set to false")
Else
Call theBinder.CheckIn (0, "")
End If
End If
End If
Next
Next