Hi all,
I have an issue with doc.GetFirstItem.
For some reason I don’t understand, it’s getting nothing.
This is my code :
dim ConfDoc as NotesDocument
dim item as NotesItem
set ConfDoc = new NotesDocument( db ) ’ db is ok for sure
ConfDoc.Form = “Conf”
ConfDocNoteID$ = “”
Call myFunction(ConfDoc, ConfDocNoteID$)
Delete ConfDoc
Set ConfDoc = db.GetDocumentByID(ConfDocNoteID$)
set item = ConfDoc.GetFirstItem(“scriptitem”)
And then, item remains empty (I should say nothing) no matter what. But debugger tells me that scrititem field is ok inside ConfDoc and I can see its value.
myFunction sets ConfDocNoteID$ and modifies ConfDoc values of course, adding some fields (scriptitem is one of them) and calls anAgent.RunOnServer(ConfDocNoteID$) which modifies ConfDoc as well.
Until now, everything was working fine. This code was inside a view action button. For some reason I had to move it inside a script library and this part is not working any more. I don’t understand why. When running debugger, I can see that ConfDoc is OK all over the process but when I run GetFirstItem, I just donc get anything.
Got any idea ?
Thanks in advance
Regards
Pascal