Workflow Actions: Configuration of Actions
You can configure workflow actions in the following ways:
- Add, update, or delete an action in the screen configuration by calling the
Add, Update, or Delete method,
respectively, in the WithActions method at the screen configuration
level.
For example, see Step 3: Adding the Action to the Workflow.
- Add, update, or delete an action in a specific state of a workflow by calling
Add, Update, or Delete method,
respectively, in the WithActions method at the state level. By adding
an action to a state, you make it available in this state unless it is restricted by the
settings specified in the screen configuration.
For details on configuring an action in a workflow state, see Workflow States: Configuring Action States.
For example, see Workflow States: To Define a Workflow State.
- Assign field values when the action is performed by calling the WithFieldAssignments method while adding or updating the action in the screen configuration. For a detailed example, see Workflow Actions: To Implement an Action with Field Assignments.
- Provide the parameters of an action by calling the WithParameterAssignments method.
- Display a dialog box when an action is clicked by calling the WithForm method. For details on defining dialog boxes, see Implementing Dialog Boxes.
- Configure the appearance of an action on the More menu and form toolbar.
- Configure the persisting options. That is, you can specify when the system should save the current changes to the database.
- Configure mass processing.
- Configure the behavior of an action.
- Map an action to the MYOB mobile app.
- Display an action on a side panel by calling the IsSidePanelScreenmethod.
Levels of Action Configuration
You can configure an action on the following levels, which are listed in order:
- In the definition of the action in a graph or in one of its extensions
- In a screen configuration
- In a workflow state
Configurations defined on each level are applied to the subsequent level. For example, if you specified a category for an action in the PXButton attribute in a graph, this category is the default category for this action for the whole screen configuration, and you can change it in the screen configuration. But for some properties (see the table below), the configuration specified on the next level can only narrow what has been defined in the previous level.
The following table lists all possible configuration types and the levels where they can be changed.
Configuration Type | Graph | Screen Configuration | Workflow State | Comment |
---|---|---|---|---|
Visibility | + | + | The condition on the next level can only narrow what has been defined in the previous level. | |
Availability | + | + | ||
Category | + | + | The location inside the category can be specified only in the screen configuration. | |
Connotation | + | + | ||
Display on the form toolbar | + | + | ||
Assign field values | + | + | ||
Provide parameters | + | |||
Display a workflow dialog box | + | |||
Configure the persisting option | + | + | ||
Run report, open a generic inquiry, create a new record | + | + | ||
Expose the action to the mobile app | + |
Mapping a Workflow Action to the Mobile App
You can map a workflow action to the MYOB mobile app without using MSDL. To map a workflow action, call the IsExposedToMobile method while adding an action to a screen configuration.
For this method to work, you must use MSDL to map the screen where the action should be displayed. For more information about mapping forms to the MYOB mobile app, see Mobile Framework Guide.