FileSave @Command (Formula Language)

Performs the menu command File - Save.

Syntax

@Command( [FileSave] )

Usage

A document must be open in Edit mode.

A form, subform, view, folder, agent, or navigator must be open in Design mode.

You can use this command with Web applications, as long as you enable the "Web access: Use JavaScript when generating pages" setting on the Basics tab of the Database Properties box. Follow this command with @Command([FileCloseWindow]) or @Command([CloseWindow]) to simulate a Submit button.

Examples

  1. This code, when added to the "Next" action button in form1 and triggered from the Notes® client, saves and closes form1 and opens form2 in edit mode.
    dbname := @DbName;
    @Command([FileSave]);
    @Command([CloseWindow]);
    @Command([Compose]; dbname; "form2")

  2. This code, when added to the Save action button in a form and triggered from Notes®, saves the current document and opens the AllDocs view when the save is successful. If the save is not successful, it returns the message, "Save unsuccessful," to the status bar.
    @If(@Command([FileSave]);@Do(@Command([CloseWindow]);@Command([OpenView];"AllDocs"));@StatusBar("Save unsuccessful"))