Form commands
Form commands
Technologies > User Interface Add-Ins > Parts for Forms > Panel-level Save and Cancel Action Buttons
Commands are simple XML elements that handle user actions. Form commands can refresh form fields, save user-entered values to the database, delete database records, or call workflow rules that implement custom business logic.
Commands are used inside
action
elements. Actions represent user interface buttons with translatable titles,
and commands represent different operations that are performed when the
user clicks on buttons.
<panel type="form" ...>
<title>Project</title>
<action>
<title>Save</title>
<command type="saveForm"/>
</action>
</panel>
Actions defined within the panel are displayed on the panel title bar.
Commands within these actions typically work with the form as a whole.
For example, the
saveForm
command
saves all form data to the database and displays any resulting validation
or error messages.
Commands can be chained together within one action. Chained commands are executed in the listed order. If one of the commands fails, the execution is stopped.
<action>
<title>Save</title>
<command type="saveForm"/>
<command type="closeDialog"/>
</action>
For further discussion of form commands, see