Domino Code Fragment

Code Name*
Update IsReader or IsAuthor agent when the field has been changed to a text field.
Date*
04/28/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.142.96.146
Description*
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
Here's the agent I was talking about!
(SetReaders)
Run On selected documents


Sub Initialize
Dim session As New NotesSession
Dim doc As NotesDocument
Dim db As NotesDatabase
Set db = session.CurrentDatabase
Dim collection As NotesDocumentCollection
Set collection = db.UnprocessedDocuments
Dim vSecurity As Variant
For i = 1 To collection.Count
Set doc = collection.GetNthDocument( i )
If doc.hasitem("Readers") Then
Set vSecurity = doc.getfirstitem("Readers")
vSecurity.isreaders = True
Call doc.save(True, True)
End If
Next i
End Sub