Has anyone seen the error cited in the subject?
This is a view action, no agent involved, I am using the view embedded in a form to update a field with names from the selected documents…code:
Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Dim session As New NotesSession
Dim uidoc As NotesUIDocument
Dim doc As NotesDocument
Dim numDoc As NotesDocument
Dim view As NotesView
Dim db As NotesDatabase
Dim col As NotesDocumentCollection
Dim curList As Variant
Dim bList() As String
Dim inx As Integer
inx = 0
Set db = Session.GetDatabase("server","database")
Set uidoc = ws.CurrentDocument
Set doc = uidoc.Document
Set col = db.UnprocessedDocuments
curList = doc.GetItemValue("fmPackSentTo")
Forall c In curList
Redim Preserve bList(inx + 1)
bList(inx) = Cstr(c)
inx = inx + 1
End Forall
If col.Count = 0 Then
Msgbox "No Person Selected", 0 + 16, "Error"
Exit Sub
End If
Set numDoc = col.GetFirstDocument
While Not(numDoc Is Nothing)
Redim Preserve bList(inx + 1)
bList(inx) = numDoc.partNumber
inx = inx + 1
Call session.UpdateProcessedDoc( numDoc )
Set numDoc = col.GetNextDocument(numDoc)
Wend
doc.fmPackSentTo = bList
Msgbox "Selected contact(s) have been added to list.", 0 + 64, "Select Contact(s)"
Call uidoc.Refresh
End Sub