Workflow Actions: To Configure the Conditional Appearance of the Action
This activity will walk you through the process of implementing an action that appears conditionally and adding it to a workflow.
Story
For a repair work order to be billed and then paid, a user needs to create an invoice
for the order. An invoice can be created for a repair work order only if it has the
Pending Payment or Completed status and no invoice has been
created for this repair work order. You need to implement the
CreateInvoice
action, as well as to configure the conditional
availability of the associated button on the form toolbar and the equivalent command
on the More menu.
Process Overview
In the customization code, first, you will define the CreateInvoice
action in a graph. Then you will add this action to the screen configuration and to
the states of the workflow where the action should be available. You will also
define a condition depending on which the action should be available.
System Preparation
Make sure that you have done the following:
- Prepared an instance with the PhoneRepairShop customization project and enabled the workflow validation by performing the following prerequisite activities:
- Prepared the screen configuration and defined the set of states by performing the Screen Configuration: To Prepare a Screen Configuration for a Form Without a Predefined Workflow prerequisite activity.
- Defined the
PendingPayment
andCompleted
workflow states by performing the Transitions: To Implement a Transition Triggered by an Action and Workflow Actions: To Implement an Action with Field Assignments prerequisite activities.