Can anyone point me in the direction where I can find some code syntax for the following situation.
When a user selects an existing user, a document will be created in another database taking 4 values from the current form and populate them into the form in the other database. The user does not need to see this creation process.
The form in the other database only contains the four fields, and they have the same names as the current form.
Thanks for any help
Subject: Creating a document in another database
You can do this using LotusScript. You would need to set the server and database where you want to create the document, and the form as well. You would also need to access the current document:
Dim Session as New NotesSession
Dim Workspace as New NotesWorkspace
Dim Db as NotesDatabase
Dim UIDoc as NotesUIDocument
Dim DocNew as NotesDocument
Dim DocCurrent as NotesDocument
Set UIDoc = Workspace.CurrentDocument
Set Db = Session.GetDatabase(“server”, “dbname.nsf”)
Set DocNew = New NotesDocument(Db)
Set DocCurrent = UIDoc.Document
DocNew.Form = “***”
DocNew.Value1 = DocCurrent.Value1
DocNew.Value2 = DocCurrent.Value2
call docNew.Save(true, false, true)
Hope this is roughly what you are looking for, I’ve written it on the fly so there are bound to be mistakes.
Katherine
Subject: RE: Creating a document in another database
I will give it a try, thanks for the help.