Using Buttons to Execute Transitions

You can use a button to execute a transition in a workflow instead of a server trigger. Use the Add Button action to add a button to a state and create a transition that executes on the button click and moves the record to the next state in the workflow.

For example, add Approve and Reject buttons to approve or reject a purchase approval. The Approve button transitions the record to an Approved state and the Reject button transitions the record to a Rejected state.

Use the following example to create an Approve button and a transition from State 2 Pending Approval to State 3 Approved.

To add a button and use the button to initiate a transition:

  1. Open a workflow and select the state that you want to transition from in the diagrammer.

    For example, choose State 2 Pending Approval.

  2. In the context panel, click New Action.

  3. In the New Action window, click Add Button.

  4. Make sure Before Record Load is selected for Trigger On and enter a button label in the Label field under Parameters. For other Add Button action properties, see Add Button Action Parameters.

    A portion of the action properties page that shows the Trigger On field set to Before Record Load. In the Parameters section of the page, the Label field is set to Approve.
  5. Click Save.

  6. In the diagrammer, hover over the bottom of the state that you want to transition from. The cursor becomes a filled half-circle.

    Drag the icon to the state to which you want to transition and release the mouse to create the transition.

  7. Select the transition in the diagrammer and click the Edit icon on the Transition tab in the context panel.

  8. In the Workflow Transition window, leave the Trigger On field blank and choose the button you created in the Button dropdown list.

    A screenshot with the Transition On field highlighted and left blank. The Button field is set to Approve.
  9. Click Save.

In the above example, when the record enters State 2: Pending Approval, an Approve button appears on the record form. Clicking the button transitions the record to State 3: Approved. Add a Set Field Value action in State 3 to set the approval status of the record to approved.

Note:

SuiteFlow prevents workflow instances and actions from processing simultaneously when workflow buttons are clicked multiple times. See, Add Button Action Guidelines.

Related Topics

Action Examples
Add Button Action
Workflow Actions
Workflow Transitions
Working with Actions
Workflow Actions Overview

General Notices