Workflow Actions: Configuration of an Action's Appearance
You can configure the appearance of an action in a specific state of a workflow and in a screen configuration. The settings specified in a screen configuration are applied to the action in all states of all workflows defined in the screen configuration.
To configure an action in a screen configuration, you call configuration methods in a lambda expression for the Add or Update method when you register an action to the screen configuration. You can configure the action's appearance in a screen configuration in the following ways:
- Specify the category in which the action will be displayed on the More menu by
calling the WithCategory method.
By default, an action is placed in the Other category.
- Specify the location of the action inside the category.
By default, the actions are displayed in the order in which they are added in the screen configuration. You can specify the action's location in one of the following ways while adding the action to the screen configuration:
- By specifying the Placement parameter in the
WithCategory method.
You can use this method when adding a new action to a category.
- By calling the Place method.
You can use this method when you need to customize the location of a predefined action in a category.
- By calling one of the following methods:
- PlaceInCategory
- PlaceFirst
- PlaceLast
- PlaceBefore
- PlaceAfter
- By specifying the Placement parameter in the
WithCategory method.
- Disable an action depending on a condition by calling the
IsDisabledWhen method.
You can also disable an action unconditionally by calling the IsDisabledAlways method. You may need this method if you want to disable a predefined action from the form.
- Hide an action if a condition is met by calling the
IsHiddenWhen method.
You can also hide an action unconditionally by calling the IsHiddenAlways method. You may need this method if you want to remove a predefined action from the form.
To configure an action in a specific state of a workflow, you call configuration methods in a lambda expression for the Add or Update method when you register an action in a state. You can configure the action's appearance in a specific state in the following ways:
- Display the action on the form toolbar.
By default, all actions are displayed on the More menu. You can display an action on the form toolbar by calling the IsDuplicateInToolbar method while adding an action to a screen configuration.
- Specify a connotation for the action in this state by calling the WithConnotation method while adding an action to the screen configuration. The connotation will be displayed for this action both on the More menu and on the form toolbar. You can specify different connotations for different states.
For details on configuring actions in a workflow state, see Workflow States: Configuring Action States.