EditDocument @Command (Formula Language)

Places the current document into the mode you specify. If you don't specify a mode, toggles between Read and Edit mode.

Syntax

@Command( [EditDocument] )

or

@Command( [EditDocument] ; mode; previewpane )

Parameters

mode

Number. Specify "1" to place the document in Edit mode or "0" to place it in Read mode.

previewpane

Number. Specify "1" to edit the document in the preview pane.

Usage

In a view or folder, this @command opens the highlighted document in the specified mode. If the mode is omitted, Edit mode is assumed.

When you use this command with Web applications, it edits the current document. Use this command only on forms for the Web. The parameters for this function do not work on the Web.

On the Web, this command does not work in view actions. To open a document in Edit mode from a view, use @Command([OpenDocument]; "1") preceded by the OpenView @command.

When you edit a document using the @command([EditDocument]), the hidden attributes within rich-text fields are not honored. The hidden attributes are honored when the document is opened in Read mode with @Command([OpenDocument]).

Examples

  1. This formula opens the current document in Edit mode.
    @Command( [EditDocument]; "1" )
  2. This formula toggles the currently open document from Read mode to Edit mode, or vice versa. At the view level, opens the document in Edit mode.
    @Command( [EditDocument] )
  3. This formula opens the current document into Edit mode in the preview pane if you are viewing from the preview pane. This feature is used in Domino®.Action.
    @Command( [EditDocument]; "1"; "1" )