My situation has 2 forms. Form 1 has a button that creates Form 2. Both forms have a Readers field called Readers. The user executing this function has a role of [Company A]. When the user pushes the button on Form 1, Form 2 gets created but, the Readers field of form 2 is not there. It is my understanding that the Readers field of form 2 should be populated with [Company A] when the NotesDocument.Save function is executed.
I use the following LotusScript code in the button’s Click event to create Form 2.
Dim usdoc As NotesDocument
Dim db As NotesDatabase
Dim session As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
'*****************************************************************************
'* Create the Form 2 document
'*****************************************************************************
Set uidoc = workspace.CurrentDocument
Set db =session.CurrentDatabase
Set usdoc = New NotesDocument(db)
usdoc.form = “Form 2”
usdoc.ProjectCodeName = uidoc.FieldGetText(“ProjectName”)
Call usdoc.Save(False, False)