I’ve got a dumb question to ask…I have a agent that is set to run on new documents and the selection is in the people folder of names.nsf…
I keep getting Object variable not set on the server console and I figure it’s the set doc or the set item lines… But i just don’t know why.
(for set item… I’ve also tried getFirstItem)…
Dim s As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim item1 As NotesItem
Dim item2 as NotesItem
Set db = s.Currentdatabase
Set doc = s.DocumentContext
Set item1 = doc.GetItemValue (“FirstName”)
Set item2 = doc.GetItemValue (“LastName”)
Print "User is: " & item1.Text & " " & item2.text
Can anyone tells me why this fails?
I figure I can do a While loop in a DC collection, but I thought when you do a set doc=s.DocumentContext under this type of agent setup,… doc is the current document the agent is running on…and it’s like it’s can’t “see” doc…