Close Form-A after inherting values into Form-B?

In the Notes Client, I am creating a new form (Form B) from an existing form (Form A). Form B inherits values from Form A.

This is done in a button with the Formula Language. How can I close Form A after composing Form B with the inherited values?

As far as I can tell, I either have to let the user manually close Form A, or close Form A programmically and don’t inherit the values into it.

Any help would be greatly appreciated.

Subject: Close Form-A after inherting values into Form-B ?

Hum… not an easy one in @formulas.

For this, I would tend to script the inheritance sort of manually (code the value copy from doc a to doc b) after doc b has been created in the backend only.

Once all the data has been copied, you can call a doc.close to close doc a, and a NotesUIworkspace.EditDocument to open the other one.

HTH

Nicolas Abesdris

Quintessence e-solutions Inc.

Subject: RE: Close Form-A after inherting values into Form-B ?

Thank you. I used script as you suggested and got it to work the way I needed it to.

Here is the code I used:

Sub Click(Source As Button)

' Create new Quote in Client DB from Request Form, values then Close orginal form

Dim ws As New NotesUIWorkspace	

Dim uidoc As notesuidocument

Dim doc As notesuidocument	



Set doc = ws.CurrentDocument

Set uidoc = ws.ComposeDocument _

( "server_name", "database_name", "Quote" )

Call doc.FieldSetText("Status","Quoted")

Call doc.Save

Call doc.Close(True)

End Sub

Subject: Example.

See if this help?

REM;

TEMP := @Prompt([YESNO]; “Create application request”; " Do you wish to compose an application development request for a NEW application?? It will be routed to the Development Team for evaluation. They will contact you about this request within the next x hours/days");

REM;

REM " If No, then exit formula, else - continue ";

@If(TEMP = 0; @Return(“”); “”);

REM;

REM " Set request Type and Formname for audit trail ";

FIELD Type := “request”;

FIELD Form := “Audit form”;

REM;

REM " Save audit document so user does not have to do it";

@Command([ViewRefreshFields]);

@Command([FileSave]);

@Command([FileCloseWindow]);

@Command([FileCloseWindow]);

REM;

REM " Compose appropriate DB form & not add DB to desktop ";

REM " Note: They will need to save composed doc and exit from DB view "

@Command([FileOpenDatabase]; “yourserver” : “General\Reqstdb.nsf”; “”; “”; “”; “1”);

@Command([Compose]; “”; “Request Form”)