Hi,I have a form (Form A) with a button, which creates another form (Form B), and this form inherits values from Form A (it is set in the properties of the form to - Formulas Inherit values from selected document). The button formula →
FIELD Transferred:=“Yes”;
FIELD DateTrans:=@Date(@Now);
@Command([ViewRefreshFields]);
@Command([FileSave]);
@PostedCommand([Compose];“Form B”)
However, I hide the button if Form A is a New Doc. Now the user wants to see the button, even if the form isn’t saved, but if it isn’t saved before creating Form B, the values won’t be inherited (like Unique ID, etc).
So, I thought of creating it in LotusScript, but if I use the method of “CreateDocument” it doesn’t inherit the current documents values either, even if I save the current document before creating the other document on From B?
My script:
Dim s As New NotesSession
Dim db As notesdatabase
Dim doc As NotesDocument
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim continue As Variant
Set db = s.CurrentDatabase
Set uidoc = ws.CurrentDocument
If FORMQuerySave(uidoc) Then
Set doc = db.CreateDocument
doc.Form = "Work"
Set uidoc = ws.EditDocument(True,doc)
Else
continue=False
End If