I am running an agent from the web and I am getting an error :
error: Illegal use of PROPERTY
Here is my code :
Sub Initialize
Dim s As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim TempDoc As NotesDocument
Dim strTempUNID As String
Set db = s.CurrentDatabase
Set doc = s.DocumentContext
strTempUNID = doc.TempDocID(0)
Set TempDoc = db.GetDocumentByUNID(strTempUNID)
doc.DocumentOwner(0) = TempDoc.DocumentOwner(0)
End Sub
I have a field on the form I am calling the agent from which holds the UNID of the document I am trying to access. Where am I going wrong?