CommandBar

The CommandBar component controls the format of the command bar displayed above the currently selected instance data using the following components:

  • DeleteConfirm
  • DeletePrompt
  • GenericActions
  • CBModalWindow

The CommandBar component is passed a parameter MyInstance that determines which Instance is being displayed on the page. The MyInstance FormBuilder parameter completely defines the states of all buttons and controls being displayed on this page. The MyInstance data will be refreshed when a new version of the instance is loaded or when control transfers to a different instance.

The command bar is displayed at the top of the form data. When the page is scrolled it will stick to the top of the form so it’s always visible within the area the form data is displayed.

The Delete button is only enabled if the user has permission to delete the currently selected instance data. If enabled, the Delete button will prompt the user with a popup dialog before attempting to delete the currently selected instance and go to its parent or containing Application page. If the instance cannot be deleted, an error will be displayed to the user.

The Cancel button is enabled when the Save button is enabled. Selecting the cancel button will discard any pending unsaved changes on the current instance and return the user to their last visited instance.

The Save button is only enabled if the user has permission to save the currently selected instance data and the user has made changes to the latest version of the data in the user experience.

If enabled, the Save button will attempt to save all changes made in the user experience to a new version of the instance data in the database. If the user is not currently editing the latest version of the instance data, then the latest version will be loaded, and the user will have the option of re-applying their changes. After the save is completed, the user will see the latest version of the currently selected instance data.

The Reload/Undo button has two distinct modes:

  • If no changes have been made to the record, then the button will display Reload and selecting the button will simply reload the latest version of the record from the database.
  • If changes have been made to the record, then the button will display Undo and selecting the button will discard all unsaved changes and reload the latest version of the record from the database.

The Done button acts the same as the Save button, except that after a successful save the user is sent back to the users last visited instance.

Whether the Delete, Save, Undo/Reload or Done buttons are enabled is determined by the FormBuilder service which will consider the current version and state of the selected instance, the roles assigned to the user and any other custom conditions required by the business.

The GenericActions component displays a dropdown list that will contain a list of different actions available on the current instance.

Updated on March 25, 2024

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Comment