Hello All,I have a current open document (WM) that i need open and from within this document i need to run an agent (via Action Button) to create a new Document (ER). there is also 1 field (identifier) that is on both the Forms that i need to have the same data to maintain a relationship between them. when I select the Action/Agent I need the original Form to stay open and i need the new Form to open which i can then add any data and then save. I have had experience with Formula Language but not much with LS. Any help would be greatly appreciated.
Thanks and Regards,
Cleve.
This is the code that I am using but it is not working…
Sub Initialize
Dim ws As New NotesUIWorkspace
Dim s As New NotesSession
Dim db As NotesDatabase
Dim orderdoc As NotesDocument, itemdoc As NotesDocument
Dim retflg As Boolean
Set db = s.CurrentDatabase
Set WMdoc = ws.CurrentDocument.Document
Set itemdoc = db.CreateDocument
itemdoc.Form = "ER"
itemdoc.identifier = orderdoc.identifier
Call itemdoc.MakeResponse(WMdoc)
Call itemdoc.Save(True, False)
End Sub