I have to update the reader’s field from Tulsi/ABC to Tulsi/XYZ – XYZ being the current domain’s certifier.
I have the following code in input translation of $Reader’s field:
“LocalDomainServers” : “AppAdmin” : namM : namB
The following code is placed in refresh documents, the agent which i have created :
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim form As NotesForm
Dim view As NotesView
Dim doc As NotesDocument
Dim newReaders(0 To 63) As String
Dim reader As String
Set db = session.CurrentDatabase
Set view = db.getview("MyWork")
Set doc=view.GetFirstDocument
While Not doc Is Nothing
If doc.Form(0)="Request" Then
newReaders(n) = doc.namM(0)
newReaders(n+1) = doc.namB(0)
Call doc.ReplaceItemValue("$Readers",newReaders)
End If
Wend
End Sub
But it is not changing the names as expected. Please advise.