0% found this document useful (0 votes)
26 views103 pages

AcumaticaERP Workflows

Uploaded by

crudbug
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views103 pages

AcumaticaERP Workflows

Uploaded by

crudbug
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 103

Developer Guide

Workflow UI
2022 R2
Contents | 2

Contents
Copyright...............................................................................................................................................4
Workflow UI Guide................................................................................................................................. 5
Getting Started with Workflows...............................................................................................................6
Getting Started with Workflows: General Information.................................................................................... 6
Getting Started with Workflows: Transitions................................................................................................... 7
Creating Workflows.............................................................................................................................. 12
Workflow Creation: General Information....................................................................................................... 12
Workflow Creation: Pages for Managing Workflows...................................................................................... 13
Workflow Creation: Planning a Workflow for a Form.................................................................................... 15
Workflow Creation: To Add a Workflow..........................................................................................................17
Workflow Creation: Configuration of States...................................................................................................19
Workflow Creation: To Add States.................................................................................................................. 19
Configuring Workflow Elements.............................................................................................................22
Workflow Elements: General Information......................................................................................................22
Workflow Elements: To Modify Field Settings................................................................................................25
Workflow Elements: To Add a Dialog Box...................................................................................................... 26
Configuring Actions.............................................................................................................................. 28
Action Configuration: General Information....................................................................................................28
Action Configuration: To Hide Unneeded Actions......................................................................................... 29
Action Configuration: Categories of the More Menu......................................................................................30
Action Configuration: To Add a Category to the More Menu.........................................................................31
Action Configuration: To Add Actions to the Dra and Processing States....................................................32
Action Configuration: To Add Actions to the Open State.............................................................................. 34
Action Configuration: To Add Actions to the Completed State and to the Postponed State....................... 36
Configuring Conditions and Transitions..................................................................................................38
Conditions and Transitions: General Information......................................................................................... 38
Conditions and Transitions: To Add Conditions............................................................................................ 40
Conditions and Transitions: To Add Transitions............................................................................................ 42
Testing the Customization..................................................................................................................... 46
Testing of the Customization: General Information.......................................................................................46
Testing of the Customization: To Test the Task Workflow............................................................................. 46
Working with Predefined Workflows...................................................................................................... 50
Inherited Workflows: General Information.....................................................................................................50
Inherited Workflows: Customization of the Opportunity Workflow............................................................. 52
Contents | 3

Inherited Workflows: To Create an Inherited Workflow................................................................................ 54


Customizing Workflows with the Diagram View...................................................................................... 57
Diagram View: General Information............................................................................................................... 57
Diagram View: To Add a New State................................................................................................................ 59
Diagram View: To Add New Actions and Transitions..................................................................................... 60
Diagram View: To Add the Auto-Run Action...................................................................................................62
Diagram View: To Add Fields...........................................................................................................................64
Diagram View: To Add Dialog Boxes............................................................................................................... 66
Diagram View: To Modify the Added Actions................................................................................................. 69
Diagram View: To Remove Unneeded Parts of the Workflow........................................................................72
Diagram View: To Update the System State...................................................................................................73
Diagram View: To Test the Inherited Workflow..............................................................................................74
Using Composite States.........................................................................................................................76
Composite States: General Information......................................................................................................... 76
Composite States: To Modify a Workflow with a Composite State............................................................... 77
Customizing Workflows with a Workflow-Identifying Field...................................................................... 82
Workflow-Identifying Fields: General Information........................................................................................ 82
Workflow-Identifying Fields: To Create an Inherited Workflow.................................................................... 83
Workflow-Identifying Fields: To Add User-Defined Fields............................................................................. 85
Workflow-Identifying Fields: To Add Conditions........................................................................................... 87
Workflow-Identifying Fields: To Add Fields....................................................................................................88
Workflow-Identifying Fields: To Add a New Action and a Transition............................................................90
Workflow-Identifying Fields: To Add New Transitions...................................................................................93
Workflow-Identifying Fields: To Modify System Actions................................................................................95
Workflow-Identifying Fields: To Test the Inherited Workflow....................................................................... 97
Upgrading Workflows..........................................................................................................................100
Upgrade of a Workflow: General Information..............................................................................................100
Upgrade of a Workflow: To Upgrade a Customized Workflow.................................................................... 100
Copyright | 4

Copyright

© 2022 Acumatica, Inc.

ALL RIGHTS RESERVED.

No part of this document may be reproduced, copied, or transmitted without the express prior consent of
Acumatica, Inc.
3933 Lake Washington Blvd NE, # 350, Kirkland, WA 98033

Restricted Rights
The product is provided with restricted rights. Use, duplication, or disclosure by the United States Government is
subject to restrictions as set forth in the applicable License and Services Agreement and in subparagraph (c)(1)(ii)
of the Rights in Technical Data and Computer Soware clause at DFARS 252.227-7013 or subparagraphs (c)(1) and
(c)(2) of the Commercial Computer Soware-Restricted Rights at 48 CFR 52.227-19, as applicable.

Disclaimer
Acumatica, Inc. makes no representations or warranties with respect to the contents or use of this document, and
specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose.
Further, Acumatica, Inc. reserves the right to revise this document and make changes in its content at any time,
without obligation to notify any person or entity of such revisions or changes.

Trademarks
Acumatica is a registered trademark of Acumatica, Inc. HubSpot is a registered trademark of HubSpot, Inc.
Microso Exchange and Microso Exchange Server are registered trademarks of Microso Corporation. All other
product names and services herein are trademarks or service marks of their respective companies.

Soware Version: 2022 R2


Last Updated: 01/30/2023
Workflow UI Guide | 5

Workflow UI Guide
This guide includes information about the following parts of workflows in Acumatica ERP: states, transitions,
actions, conditions, fields, and event handlers. By using this guide, you can become familiar with the processes of
creating custom workflows and customizing predefined workflows. This information will help you fine-tune the
workflows to meet your business needs.

Many of the activities in this guide are dependent on earlier activities. We recommend that you
complete the activities in the order in which they are presented.
Getting Started with Workflows | 6

Getting Started with Workflows


In this chapter, you will learn what workflows are in Acumatica ERP and what these workflows consist of. You can
use this understanding to create new workflows and customize existing ones so that the Acumatica ERP forms best
fit the company's ways of working.

Getting Started with Workflows: General Information

A workflow is a depiction of the ways the state of a record created on a particular Acumatica ERP form changes as a
result of specific user interactions on the form and other events. You can use the pages of the Customization Project
Editor to create and customize workflows.

Learning Objectives
In this chapter, you will learn what workflows are and how you can use them.

Applicable Scenarios
You might need to use workflows if the movement of records in the company follows an established sequence of
operations. By customizing predefined workflows to represent this sequence, you can automate the company’s
processes, which can speed the processing of records.

States and Transitions


A workflow can be described as a state machine, with transitions showing the movement of the record through its
processing in the system as the corresponding work is performed in the company. For example, a workflow can
involve the changing of the status of an opportunity based on user interactions on the Opportunities (CR304000)
form to reflect the progress made with the potential customer that represents an opportunity.
For details on transitions, see Getting Started with Workflows: Transitions.

Actions and Fields


You can configure the action and field properties for a form and its workflows at the same time, depending on
the conditions specified for the form when a record has any state or has a particular state. The action properties
indicate whether the action is visible and whether it is enabled. The field properties indicate whether the field is
visible, whether it is enabled, and whether it is required.
If either at the workflow level or at the form level, a field is disabled, hidden, or required, it becomes disabled,
hidden, or required, respectively, on the screen. If an action is disabled or hidden at one of these levels, it becomes
disabled or hidden, respectively, on the screen.

Conditions
Conditions can be used in the properties of actions and fields at the form level (that is, for all workflows of a
particular form). At the workflow level, conditions can be used to determine whether transitions are performed.
Also, conditions can be used to determine whether actions are performed automatically.
Getting Started with Workflows | 7

Customization of Workflows
You can customize predefined workflows for forms that have them (the resulting customized workflows are
referred to as inherited) or create custom workflows that are not based on existing workflows. For the list of forms
with predefined workflows, see Inherited Workflows: General Information.
You can define a single workflow for the whole form or multiple workflows, one for a record with each value of
a specific field, such as a record type. You can configure the settings—such as field properties, conditions, and
actions—for the whole form. For each of the workflows of the form, you can configure the properties of actions and
fields for every state the record can have. These properties determine the appearance of the form when the record
has a particular state.

Getting Started with Workflows: Transitions

A transition in a workflow is triggered if a user performs a particular action or a specific event is raised in the code.
An event can be raised when some change occurs on the current form to the selected record or on another form to
another record.

Transition Steps for an Action


In the following diagram, you can see the steps that the system performs during a transition to the target state
when a user clicks a button or command to invoke an action on the UI of the current form.
Getting Started with Workflows | 8

Figure: Steps in a transition for an action

First, a user clicks a button or command to invoke an action on the UI of the form (Item 1 in the diagram). If
applicable, the dialog box you have specified for the action is displayed, and the user enters the needed values
in this dialog box (Item 2). Then the system updates the fields you have specified with the values the user has
entered in the dialog box for the action (Item 3). Optionally, if the action is defined in a graph, the system applies
the properties that you have specified for the action (Item 4) and invokes the action method (Item 5); only actions
Getting Started with Workflows | 9

defined in a graph can have a method to be invoked and properties to be applied. If you have specified both a
transition that the action triggers and a condition for this transition, the condition is then checked (Item 6).

In each transition, you can check for only one condition. To check for multiple conditions, you have
to define multiple transitions, one for each condition. The system checks transition conditions in
the order in which the transitions are defined on the Workflow (Tree View) or Workflow (Diagram
View) page of the Customization Project Editor. Conditions are defined on the Conditions page for the
customized screen. For details, see Conditions and Transitions: General Information.

If you have specified the fields to be updated aer the transition and the fields to be updated when a record enters
or leaves the state, the system does the following:
1. In the original state, assigns new values to the fields that should be updated when a record exits the state
(Item 7)
2. Updates the fields that should be updated aer this particular transition (Item 7)
3. In the target state, assigns new values to the fields that should be updated when a record enters the state
(Item 7)
4. Changes the record's state to the target state you have specified for the transition

The following steps are performed only if you have specified data on the corresponding tabs:
• Displaying a dialog box (Item 2)
• Updating the field values before the transition (Item 3)
• Applying action parameters to the action method (Item 4)

This step can be performed only if an action is in a graph and thus has an action to which
parameters should be applied.

• Checking for a condition (Item 6)


• Updating field values at the end of the transition (Item 7)
• Updating field values when a record enters a state or leaves it (Item 7)

Transition Steps for an Event Handler


In the following diagram, you can see the steps that the system performs during a transition to the target state
when some change occurs on the current form to the current record or on a different form to another record. This
raises an event in the code, which in turn invokes the event handler.
Getting Started with Workflows | 10

Figure: Steps in a transition for an event handler

First, a user invokes an action on the UI of a different form for some other record (Item 1 in the diagram) or changes
a value in a box on this form or another form. This triggers an event in the code (Item 2). Then the system invokes
an event handler (Item 3) and updates any fields that you have specified for this event handler (Item 4). If you have
specified a transition for this event handler and a condition for this transition, the condition is checked (Item 5).

In each transition, you can check for only one condition. To check for multiple conditions, you have
to define multiple transitions, one for each condition. The system checks transition conditions in
the order in which the transitions are defined on the Workflow (Tree View) or Workflow (Diagram
View) page of the Customization Project Editor. Conditions are defined on the Conditions page for the
customized screen. For details, see Conditions and Transitions: General Information.

If you have specified the fields to be updated aer the transition and the fields to be updated when a record enters
or leaves the state, the system does the following:
1. In the original state, assigns new values to the fields that should be updated when a record exits the state
(Item 6)
2. Updates the fields that should be updated aer this particular transition (Item 6)
Getting Started with Workflows | 11

3. In the target state, assigns new values to the fields that should be updated when a record enters the state
(Item 6)
4. Changes the record's state to the target state you have specified for the transition

The following steps are performed only if you specified data on the corresponding tabs:
• Updating the field values before the transition (Item 4)
• Checking for a condition (Item 5)
• Updating field values at the end of the transition (Item 6)
• Updating field values when a record enters a state or leaves it (Item 6)
Creating Workflows | 12

Creating Workflows
In this chapter, you will learn how to create a workflow from scratch. Creating a workflow rather than customizing
one may be the best option when the Acumatica ERP form for which you need a workflow does not have one, or
when the needed workflow is too different from the predefined workflow or workflows of the form. No coding is
required for the workflow creation process.

Workflow Creation: General Information

The process of creating a workflow does not require coding. Instead, you can use pages of the Customization
Project Editor, which make it easy to work with the workflow and its components.
Before you can add a workflow, the screen corresponding to the form must be added to the list of customized
screens on the Customized Screens page. To define a workflow, you use the pages organized under the Screens
node in the navigation pane of the Customization Project Editor for a particular form. See Workflow Creation: Pages
for Managing Workflows for details on the pages you will use to create and edit the workflow.

The term screen is generally used to describe what you are creating or customizing in the
Customization Project Editor. This term distinguishes the entity you work with here from the form that
will be used in Acumatica ERP. However, a form and its corresponding screen are essentially the same
thing.

Learning Objectives
In this chapter, you will learn how to use the Workflow (Tree View) page, and how to create a workflow from scratch.

Applicable Scenarios
You create a workflow when the form you want to customize does not have one, or when the existing workflow
does not fit your business processes.

Creation of a Workflow for a Form


When you define a workflow for a particular form, you need to do the following:
1. Determine all possible states of the record that users work with on the particular form, and define those that
do not already exist.
2. For each state, add all actions that can be performed with a record in this state and all transitions associated
with each action.
3. Optional: If when an action is invoked, a user has to provide additional information for the record to
transition to a different state, define the dialog boxes that contain the UI elements whose settings should be
specified.
4. Optional: If some modifications to the form elements (in terms of their appearance, usability, and
requirement) are needed , specify which UI elements on the applicable form are shown, enabled, and
required for each state of the workflow.
5. Optional: If some modifications to the form actions are needed, specify which actions on the applicable
form should have connotations and should be duplicated on the form toolbar (in addition to being shown
on the More menu) for each state of the workflow.
6. Optional: If the values of certain fields should be updated aer a transition, add new values for the fields.
Creating Workflows | 13

7. Optional: If some modifications to the form fields are needed when the record enters a particular state or
when it leaves it, add new values for these fields.
8. Optional: If certain states have similar properties or can be skipped under certain conditions, add these
states to a composite state (for details, see Using Composite States).

Creation of Multiple Workflows for a Form


You can add multiple workflows for a particular form. In this case, each workflow is applied to all entities that have
a specific value in a particular field, which can thus be described as a workflow-identifying field because its value
determines the workflow to be used.
For example, for opportunities on the Opportunities (CR304000) form, one workflow can be applied to opportunities
for which one opportunity class is selected, and another workflow can be applied to opportunities for which
another class is selected.
For details on creating or customizing a workflow with workflow-identifying field, see Workflow-Identifying Fields:
General Information.

Development of Workflows in an Extension Library


You can develop and customize workflows not only in the Customization Project Editor but also in Visual Studio
by using an extension library. To develop workflows, you should use the set of classes that is located in the
PX.Data.WorkflowAPI namespace. For details, see To Define a Workflow from Code.

Workflow Creation: Pages for Managing Workflows

This topic describes the primary pages you will use when you are developing a workflow or managing all of the
workflows of a particular form, which is referred to as a screen in the Customization Project Editor.
You can add a workflow only if the screen of the workflow has been added to the list of customized screens on the
Customized Screens page.

Primary Pages for Workflow Creation and Editing


For any screen that has been added to the Customized Screens page, you can use the Workflows page to view the
workflows and their general settings. (The table on the page is empty if no workflows have been defined for the
screen.) To open this page, in the navigation pane of the Customization Project Editor, you click Workflows under
the screen ID. This page is described in the Workflows Page section of this topic.
You can click Add Workflow on the page toolbar, which opens the Workflow (Tree View) page. This page, which is
sometimes called the Workflow Editor, is the primary page that you will use when you are developing or modifying
a workflow. By clicking Diagram View on the page toolbar, you can work with the Workflow (Diagram View) page
(see the Customizing Workflows with a Workflow-Identifying Field chapter of this guide). The diagram view is also
referred to as the Workflow Visual Editor.
To use the Workflow (Tree View) page for an existing workflow, you can click its link in the Workflow Name column
of the Workflows page. You can also click the workflow name in the navigation pane under Workflows for the
screen you are modifying.

The Workflows Page


The Workflows page contains the list of all workflows defined for a particular screen—predefined workflows, as well
as inherited or custom workflows—as well as the general settings of the workflow.
Creating Workflows | 14

The following screenshot shows the Workflows page with a single workflow (the predefined workflow with the
name Default Workflow) for the Leads (CR301000) form. Notice that the page name is CR301000 (Leads) Workflows;
the screen number and its name (in parentheses) precede Workflows.

Figure: The Workflows page

The Tree View of the Workflow Page for Different Workflow Types
The Workflow (Tree View) page provides the tree view of the selected workflow in the States and Transitions
pane. In the right pane, the page has tabs that hold the settings of the workflow. The page has some differences
based on the type of workflow you are viewing—custom, inherited (customized), or predefined. (See the following
screenshot, which shows a predefined workflow.)

Figure: Workflow page (tree view)

The screenshot shows the lead workflow—that is, the workflow of leads that are created on the Leads (CR301000)
form. Notice that the name of the page starts with CR301000 (Leads) to indicate the screen whose workflow is
being edited. The screen ID is followed by State Diagram and the workflow name, which is Default Workflow in the
Creating Workflows | 15

screenshot above. (This name is assigned to the predefined system workflow of a screen with only one predefined
workflow.)
For a custom, inherited, and predefined workflow, the page has the same major parts: the page toolbar, the States
and Transitions pane, and the tabs area. The variants of the page are different in the following ways:
• For a custom workflow, all commands on the More menu are available; the names of states and transitions
do not have Inherited or Modified aer them.
• For an inherited (customized) workflow, all commands on the More menu are available; the names of states
and transitions in the States and Transitions pane have Inherited or Modified aer them.
• For a predefined workflow, all commands on the More menu except for Tree View (or Diagram View) are
unavailable.

Workflow Creation: Planning a Workflow for a Form

If an Acumatica ERP form does not have a workflow, you might want to create a workflow for it. In this topic, you
will consider such a form, the predefined Task (CR306020) form in Acumatica ERP, and explore an example of
defining a workflow for the form.

Overview of the Predefined Task Form


Open the Tasks (EP404000) form and click Add Task on the form toolbar. On the Task (CR306020) form, which
opens, notice the following:
• A user can change the status of the selected task by selecting an option in the Status box. This indicates that
the form does not have a workflow. For a form with a workflow, a user would click buttons or commands to
invoke actions that change the status of the selected task.
• In the Status box, the following options are available:
• Open
• Dra
• Processing
• Canceled
• Completed
The corresponding states have the same names.
• On the form toolbar, the following buttons (which have underlying actions) are available:
• Complete
• Complete & Follow-Up
• Cancel
• When you create a new task, the Start Date box is empty; the system does not insert the current date in this
box.
• If you change the status of a task to Completed, the value in the Completion (%) box changes to 100;
however, if you then change the value in the Status box to any other value (Open or Processing), the value in
the Completion (%) box remains 100.

The Needed Workflow for the Task Form


Suppose that you want to customize the workflow so that a task can have the following states: Dra, Open,
Processing, Completed, and Postponed. You do not need the Canceled state (you will use the <...> state instead), and
you do not need the Cancel and Complete & Follow-Up actions (or the corresponding buttons). You also want the
task workflow to have the transitions shown in the following table.
Creating Workflows | 16

Table: Transitions of the new task workflow

Original State Action Target State

Dra Open Open

Postpone Postponed

Open Start Work Processing

Complete Completed

Postpone Postponed

Processing Complete Completed

Postpone Postponed

Completed Reopen Open

Postponed Open Open if the value in the Completion (%) box is 0

Open Processing if the value in the Completion (%) box is not 0

Further suppose that you want to implement the following changes to the Task form:
• When a user creates a new task, by default, the task's status should be Dra, the Start Date should be the
current date, and the Completion (%) box should be unavailable.
• If a task has the Open or Processing status, the user must fill in the Owner box.
• If a task has the Processing status and the user specifies 100 in the Completion (%) box, the status of the
task automatically changes to Completed.
• If the status of a task changes from Completed to Open, the user must specify a new value in the Completion
(%) box.
As a result, the workflow should look like the one shown in the following diagram.
Creating Workflows | 17

Figure: The planned task workflow

Workflow Creation: To Add a Workflow

The following activity will walk you through the process of adding the screen associated with the Task (CR306020)
form to the list of customized screens and adding a workflow for the screen.

This activity is based on the U100 dataset. If you are using another dataset, or if any system settings
have been changed in U100, these changes can affect the workflow of the activity and the results of
the processing. To avoid any issues, restore the U100 dataset to its initial state.

Story
Acting as an administrator, you need to create a workflow for the Task (CR306020) form. In later activities, you will
modify this workflow to fit the company's processes.

Process Overview
In this activity, you will do the following to begin the customization of the Task (CR306020) form and its workflow:
1. By using the Customization Projects (SM204505) form as a starting point, add the Task (CR306020) form to
the list of customized screens on the on the Customized Screens page of the Customization Project Editor.
2. Create a workflow for this form on the Workflows page.
3. Navigate to the Workflow (Tree View) page to view the workflow.

System Preparation
Before you begin creating a workflow for the Task (CR306020) form, do the following:
Creating Workflows | 18

1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. On the Enable/Disable Features (CS100000) form, make sure that the following features are enabled:
• Business Account Locations
• VAT Reporting
3. On the Customization Projects (SM204505) form, create a customization project named TaskWorkflow.

Step 1: Adding the Screen to the List of Customized Screens


To add the screen associated with the Task (CR306020) form to the list of customized screens, do the following:
1. In the table on the Customization Projects (SM204505) form, click the TaskWorkflow link.
The Customization Project Editor opens for the TaskWorkflow customization project. You will use this project
to modify the Task form.
2. In the navigation pane of the Customization Project Editor, click Screens.
3. On the page toolbar of the Customized Screens page, which is opened, click Customize Existing Screen.
4. In the Customize Existing Screen dialog box, which is opened, select Task (CR306020).
5. Click OK to close the dialog box.
The screen with the CR.30.60.20 screen ID and the Tasks title is added to the list of customized screens.

Step 2: Creating a Workflow for the Form


Create a new workflow for the added screen as follows:
1. In the navigation pane, click Screens > CR306020 > Workflows.
The CR306020 (Task) Workflows page opens. (This is the name that appears on the form for the Workflows
page.) Notice that it does not contain any workflows.
2. In the State Identifier box, select Status.
This is the field that will define the status of the applicable record created on the form.
3. Save your changes.
4. On the page toolbar, click Add Workflow.
5. In the Add Workflow dialog box, which is opened, specify the following settings:
• Operation: Create New Workflow (specified automatically)
• Workflow Type: DEFAULT
• Workflow Name: Task
6. Click OK to close the dialog box.
A row for the workflow appears in the table on the page. Notice that the workflow’s status is New, which
means that this workflow is a custom workflow that is not based on any predefined workflow.
7. In the row with the workflow you have created, select the Active check box.
8. On the page toolbar, click Save.
9. In the in the row with the created workflow, click the link in the Workflow Name column.
Creating Workflows | 19

The CR306020 (Task) State Diagram: Task page opens. (This is the Workflow (Tree View) page.) Notice that the
States and Transitions pane of the page does not contain any states or transitions.

You have added the Task (CR306020) form to the list of customized screens and created a new workflow for it.

Workflow Creation: Configuration of States

States in a workflow for an Acumatica ERP form represent the statuses of a record that is created on this form.

State Configuration
You add a new or existing workflow state to the Workflow (Tree View) page by clicking Add State or Add Predefined
State, respectively, on the More menu of this page. Aer you enter the needed settings in the dialog box that opens,
the added states are displayed on the States and Transitions pane of the page. You can then click Move Up or
Move Down on the pane toolbar to change the location of the states, if needed.
The following screenshot shows the states on the States and Transitions pane for the opportunity workflow.

Figure: States on the State and Transitions pane

When you add a new state to a workflow, the field that is specified as the state identifier for the screen is added to
the customization project and can be viewed on the Fields page. Also, for the field, the system adds a value with the
same name as the state name.

Workflow Creation: To Add States

The following activity will walk you through the process of adding new and predefined states to the workflow.
Creating Workflows | 20

Story
Acting as the system administrator, you need to add predefined states and a new state to the workflow you have
defined for the Task (CR306020) form.

Process Overview
A predefined state is one that already exists in the system. On the Workflow (Tree View) page, you will add the
following predefined states to the Task workflow:
• Dra
• Open
• Processing
• Completed
You will also add a new state to the workflow.

System Preparation
Before you begin adding states to the workflow, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have completed the Workflow Creation: To Add a Workflow activity.

Step 1: Adding the Predefined States to Your Workflow


To add the predefined states to your workflow, in the Customization Project Editor for the TaskWorkflow project, do
the following:
1. In the navigation pane, click Screens > CR306020 > Workflows > Task.
The CR306020 (Task) State Diagram: Task page opens.
2. On the More menu (under Actions), click Add Predefined State.
3. In the Add Predefined State dialog box, which opens, select Dra in the State box.
4. Click OK to close the dialog box.
The Dra state is added to the States and Transitions pane.
5. By using instructions that are similar to Instructions 2–4, add the Processing, Completed, and Open
predefined states to the workflow.
Each state will be added to the States and Transitions pane below the previous state.
6. In the States and Transitions pane, click the Dra state, and on the State Properties tab, make sure that
the Initial State of the Workflow check box is selected.
This state will be the initial state in the workflow. That is, when a user creates a new task, this task will have
the Dra status.
7. On the page toolbar, click Save.
Creating Workflows | 21

Step 2: Adding a New State to Your Workflow


In this step, you will add a new state to your workflow. While you are still working on the CR306020 (Task) State
Diagram: Task page of the Customization Project Editor, do the following:
1. On the More menu (under Actions), click Add State.
2. In the Add State dialog box, which opens, specify the following settings:
• Identifier: PP
• Description: Postponed
The dialog box should look as shown in the following screenshot.

Figure: The Add State dialog box

3. Click OK to close the dialog box and add the new state to the States and Transitions pane.
4. On the page toolbar, click Save.
5. In the navigation pane, click Screens > CR306020 > Fields.
The CR306020 (Task) Fields page opens. Notice that the table contains a row with the UIStatus field, which is
the state-identifying field specified for the screen on the Workflows page.
6. On the page toolbar, click Combo Box Values.
7. In the Combo Box Values dialog box, which is opened, notice that the new value (Postponed) has been
added to it, as shown in the following screenshot. When a new state is added to a workflow, for the state-
identifying field, the system adds a value with the same name.

Figure: The Fields page with the added field

You have added four predefined states and one new state to the workflow of the Task (CR306020) form.
Configuring Workflow Elements | 22

Configuring Workflow Elements


In this chapter, you will learn how to configure workflow elements. You can specify the properties of any field
to control the elements that correspond to these fields on the UI, including whether they appear, whether they
are available, and whether they are required. Also, you can configure dialog boxes if you want users to provide
additional information when they click a button or command to invoke an action.

Workflow Elements: General Information

By using the Fields page (sometimes referred to as the Field Editor), you can manage how particular boxes or check
boxes are displayed on the form and what values can be selected from drop-down lists, depending on the status of
the record on the form being modified.
You can also configure a dialog box that is shown to a user who clicks a particular action on a specific form. To give
you the ability to define workflow dialog boxes, the Customization Project Editor provides the Dialog Boxes page
(also called the Dialog Box Editor).

Learning Objectives
In this chapter, you will learn how to modify field settings and create dialog boxes.

Applicable Scenarios
You specify field settings when you want to modify the display of the elements that correspond to these fields on
the UI. You configure dialog boxes if you want users to provide additional information when an action is performed.

Fields Page
You use the Fields page to modify the following settings of a particular field of a specific form:
• Disabled: An indicator of whether the corresponding element on the UI is visible or invisible.
• Hidden: An indicator of whether the corresponding element on the UI is available or unavailable.
• Required: An indicator of whether the corresponding element on the UI is required or optional.
• Display Name: The name of the corresponding element as it is displayed on the UI.
• Default Value: The default value for the corresponding box on the UI. This value will be inserted when a
user adds a new record.
You can enter the needed value for the element or select one of the values available in the database. You
can also use the Formula Editor to specify values that depend on the values of other elements (for example,
Type or Status).
• List of combo box values: If the element is a combo box, the combo box values that can be selected in the
box.
In the navigation pane of the Customization Project Editor, you open the Fields page by clicking Fields under the
screen ID of the form for which you are modifying the field’s settings. The page contains the following parts:
• A page toolbar with the standard table toolbar buttons and the following commands on the More menu:
• Combo Box Values (under Actions): You click a row with the applicable field and then click this
command to configure the list of values if the field is displayed as a combo box. (If it is not, the command
is unavailable.)
• View Changes (under Changes): When you click a row with the applicable field and then click the
command, the Changes dialog box is opened, where you can view the description of a field in JSON
Configuring Workflow Elements | 23

format. If any changes have been applied to the predefined field, they are highlighted in the dialog box.
You can return the field to the predefined state by clicking Revert Changes in the Changes dialog box.
• A table that lists the fields and their basic settings.
The following screenshot shows the CR301000 (Leads) Fields page with the added CampaignID, EMail, and
Phone3Type fields.

Figure: The CR301000 (Leads) Fields page (Field Editor)

In the name that appears on the page, Fields is preceded by the screen ID and then the screen name in
parentheses, so you can always see at a glance which form you are customizing.

Dialog Box Editor


In the navigation pane of the Customization Project Editor, you can open the Dialog Boxes page by clicking Dialog
Boxes under the screen ID of the form for which the workflow has been defined. The Dialog Boxes page, shown in
the following screenshot contains the following parts:
• A page toolbar (see Item 1 in the screenshot) with standard buttons and the following commands on the
More menu:
• Preview Dialog Box (under Actions): To open the selected dialog box, you click this command aer
clicking the applicable dialog box in the Dialog Boxes pane.
• View Changes (under Changes): This button is available only if the dialog box is inherited—that is, based
on a predefined dialog box. When you click the applicable dialog box in the Dialog Boxes pane and click
the command, the Changes dialog box is opened, where you can view the description of the dialog box
in JSON format. You can also see if any changes have been applied to the predefined dialog box that this
dialog box is based on.
You can return the dialog box to the predefined state by clicking Revert Changes in the Changes dialog
box.
Some of these commands may also be displayed as buttons on the page toolbar.
• The Dialog Boxes pane, which contains the list of dialog boxes defined for the form (Item 2).
• An area with summary information about the dialog box selected in the Dialog Boxes pane and the Dialog
Box Fields table, which shows its fields (Item 3).
Configuring Workflow Elements | 24

Figure: The CR306000 (Cases) Dialog Boxes page (Dialog Box Editor)

In the name that appears on the page, Dialog Boxes is preceded by the screen ID and then the screen
name in parentheses, so you can always see at a glance which form you are customizing.

You can hide any field in the selected dialog box depending on a condition. To do this, in the Hidden column of
the Dialog Box Fields table, you select the condition for the particular field. If this condition is met, the field is not
displayed in the dialog box.
If all fields of a dialog box are hidden, this dialog box is not displayed. If particular fields are hidden but have
default values specified for them, these fields are not displayed in the dialog box; however, it is still possible to use
these fields in the workflow.
If you no longer plan to display a particular field in the dialog box, you can also unconditionally hide the field in the
dialog box by selecting True in the Hidden column for this box. This functionality can be useful if the field has been
added in the predefined workflow but is not required in the customized workflow. If you hide the field by selecting
True in the Hidden column, no additional workflow modifications are required to hide the field.

Values for a Drop-Down List in a Dialog Box


In a dialog box that the system displays when you invoke particular actions on a form, you can select the source of
the values that will be available in a drop-down list. Instead of specifying drop-down values explicitly for multiple
dialog boxes, you can indicate that these values should be the same as in the target state or source state of the
transition. By using this functionality, you can use only one dialog box for all actions in a workflow.
You select the source of the values of a drop-down list in the Combo Box Values dialog box. When you are viewing
the Dialog Boxes page for a custom or customized workflow, you open this dialog box by clicking a particular field
in the Dialog Box Fields table and then clicking Combo Box Values on the table toolbar.
In the Source of Values box of the dialog box, you select one of the following options (see the screenshot below):
• Take From Source State: The values from the source state of the transition are used. This is the default option
for a drop-down list in a new dialog box.
• Take From Target State: The values from the target state of the transition are used.
• Specify Explicitly: The values are selected in the table in the Combo Box Values dialog box. (This option has
been used in the predefined system workflows in previous versions of Acumatica ERP.)
Configuring Workflow Elements | 25

Figure: The Source of Values box of the Combo Box Values dialog box

If an action triggers transitions to multiple target states, we recommend that you use the Specify
Explicitly or Take from Source State option.

For details about transitions, see Conditions and Transitions: General Information.

Workflow Elements: To Modify Field Settings

The following activity will walk you through the process of modifying the field settings of the workflow states you
have added while performing the Workflow Creation: To Add States activity.

Story
Acting as the system administrator, you need to modify the field settings for the workflow state you have added in
Workflow Creation: To Add States. With the modified settings, when a task is created, the value in the Start Date box
will be the current date, and the Completion (%) box will be disabled.

Process Overview
On the Workflow (Tree View) page, you will add the Start Date and Completion (%) fields to the Dra state.
As a self-test, you will also add the Owner field to the Open and Processing states on the same page.

System Preparation
Before you begin modifying field settings, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have completed the Workflow Creation: To Add States activity.
Configuring Workflow Elements | 26

Step: Modifying the Field Settings for the Dra State


To modify the field settings of the Dra state, in the Customization Project Editor for the TaskWorkflow project, do
the following:
1. In the navigation pane, click Screens > CR306020 > Workflows > Task.
The Workflow (Tree View) page opens.
2. In the States and Transitions pane, click the Dra state.
3. On the Fields tab of the State Properties tab, click Add Row on the table toolbar, and specify the following
settings in the added row:
• Object Name: Activity (inserted automatically)
• Field Name: Start Date
• Default Value: @Today
4. Click Add Row on the table toolbar again, and specify the following settings in the added row:
• Object Name: Activity (inserted automatically)
• Field Name: Completion (%)
• Disabled: Selected
5. Save your changes.

You have modified the field settings of the workflow states for the Task (CR306020) form.

Self-Test Exercise
Now that you have learned how to add fields for workflow states, add the Owner field to the Open and Processing
states, and mark this field as required for both states.

Workflow Elements: To Add a Dialog Box

The following activity will walk you through the process of creating a dialog box.

Story
When a user reopens a completed task on the Task (CR306020) form, the system needs to display a dialog box. In
this dialog box, the user must specify the percent of task completion. Acting as the system administrator, you will
create this dialog box.

Process Overview
By using the Dialog Boxes page, you will add a new dialog box to the workflow.

System Preparation
Before you begin adding a dialog box, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.
Configuring Workflow Elements | 27

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have completed the Workflow Elements: To Modify Field Settings activity.

Step: Creating a Dialog Box


To create the Reopen dialog box, do the following in the Customization Project Editor for the TaskWorkflow project:
1. In the navigation pane, click Screens > CR306020 > Dialog Boxes. The CR306020 (Task) Dialog Boxes page
opens.
2. On the pane toolbar of the Dialog Boxes pane, click the button with the plus sign.
3. In the New Dialog Box dialog box, which opens, type FormReopen as the name, and click OK.
4. On the Dialog Boxes pane, click the name of the added dialog box.
5. In the Title box on the right pane, enter Details.
6. In the Dialog Box Fields table, click Add Row on the table toolbar, and specify the following settings in the
added row:
• Schema Field: PX.Objects.CR.CRActivity.PercentCompletion
This is the name of the field that corresponds to the Completion (%) box of the Task (CR306020) form.
• Field Name: Completion
• Title: Completion (%) (specified automatically)
• From Schema: Selected
• Default Value: 0
• Required: Selected
• Column Span: 1
7. Save your changes.
8. On the page toolbar, click Preview Dialog Box.
The dialog box should look as shown in the following screenshot.

Figure: The Details dialog box for the Reopen action

You have created the dialog box to be displayed when a user reopens a task on the Task (CR306020) form.
Configuring Actions | 28

Configuring Actions
In this chapter, you will learn how to configure actions in a workflow. You can create new actions, hide unneeded
actions, and modify existing actions.

Action Configuration: General Information

To define actions for a workflow, you use the Actions page (sometimes described as the Action Editor).

Learning Objectives
In this chapter, you will learn how to add new and existing actions to the workflow. You will also modify the added
actions.

Applicable Scenarios
You add actions to trigger transitions between the states of a workflow.

Actions Page
On the Actions page, you create actions, add predefined actions, and configure the properties of the actions that
have been added in the editor. Actions added in the predefined workflow are automatically displayed on the page,
and you can modify the properties of these actions.
To understand which of the listed actions are predefined and which are new, note the Status column for each
action. Predefined actions have the Inherited status, and all actions that you have added to the Actions page
(including existing graph actions) have the New status. If you have modified a predefined action, its status changes
to Modified (see the following screenshot).

In the name that appears on the page, Actions is preceded by the screen ID and then the screen name
in parentheses, so you can always see at a glance which form you are customizing.

You configure actions for a particular screen. Therefore, before you start configuring actions, you need to make sure
that the corresponding screen has been added to the customization project on the Customized Screens page.

Types of Actions
You can add the following types of actions by using the Actions page:
• Actions that redirect a user to a different form or report
• Workflow actions that change the state of the applicable record
• Actions that open a side panel
• Actions defined in a graph
The following table lists the types of redirect actions you can add and the screen ID you can specify for an action of
the type.

Action Type Screen ID

Run Report The screen ID of the report that you want to run and to which you want to redi-
rect the user, such as Sales Order Summary (SO610500).
Configuring Actions | 29

Action Type Screen ID

Navigation: Search Records The screen ID of the form to which you want to redirect the user; this is a form
where a user can search for records, such as an inquiry or a generic inquiry. For
example, you might specify this action type with the screen ID SO3010PL, which
is the ID of the substitute form (list of records) for the Sales Orders entry form.

Navigation: Create Record The screen ID of the form to which you want to redirect the user; this is a form
on which a user can create a new record. For example, you might specify
SO301000 as the screen ID; it is the ID of the Sales Orders (SO301000) data entry
form.

Navigation: Side Panel The screen ID of the form that will be opened in a side panel when a user clicks
the action. You can specify the following types of forms: dashboards, reports,
and generic inquiries. For example, you might specify CR306000 as the screen
ID; it is the ID of the Cases (CR306000) data entry form.

Adding a side panel is supported for only data entry forms.

Creation of Actions
You can create actions in the following ways:
• By clicking Create to the right of the Trigger Name box in the Add Transition dialog box when you are
creating a transition on the Workflow (Tree View)Workflow page
• By clicking Create Action on the table toolbar of the Actions tab for the state selected in the Workflow (Tree
View) page
• By clicking Create Action on the Actions tab of the State dialog box for a state selected in the Workflow
(Diagram View)
• By clicking Create New Action on the page toolbar of the Actions page

Other types of actions (redirect actions) can be created only on the Actions page.

Viewing of Changes Between the Predefined and Customized Action


All predefined actions of the applicable screen are displayed on the Actions page by default. If you have modified
a predefined action on this page, you can view the changes by clicking View Changes on the More menu. You can
also return the action properties to the original predefined state, if needed.

Action Configuration: To Hide Unneeded Actions

The following activity will walk you through the process of hiding actions that are not required for the task
workflow.

Story
In your workflow, you do not need the Cancel and Complete & Follow-Up actions (or the corresponding buttons).
Acting as the system administrator, you are going to hide these buttons on the Task (CR306020) form.
Configuring Actions | 30

Process Overview
By using the Actions page, you will hide the Cancel and Complete & Follow-Up actions in the workflow states.

System Preparation
Before you begin hiding unneeded actions, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have completed the Action Configuration: To Add a Category to the More Menu activity.

Step: Hiding Actions


To hide the Cancel and Complete & Follow-Up actions, do the following in the Customization Project Editor for the
TaskWorkflow project:
1. In the navigation pane, click Screens > CR306020 > Actions.
The CR306020 (Task) Actions page opens.
2. On the More menu (under Actions), click Add Existing Action.
3. In the Action Properties dialog box, which is opened, specify the following settings:
• Action Name: CancelActivity
• Hidden: True
This setting indicates that this action will be hidden in all states of the workflow.
4. Click OK to close the dialog box and save your changes.
5. By using instructions that are similar to the previous three instructions, add the Complete & Follow-Up
action and mark it as hidden.

You have marked the system actions as hidden for all states of the workflow.

Action Configuration: Categories of the More Menu

When you add an action on the Actions page, you specify the category on the More menu where the menu
command associated with the action will be displayed. By default, no category is specified for an action, which
means that its command will be listed under the Other category. For details on actions, see Action Configuration:
General Information.

Management of the Categories


To manage the categories on the More menu of a particular form, you click the Manage Categories button on the
page toolbar of the Actions page, which opens the Manage Categories dialog box. In the dialog box, you can add
new categories; you can also change the order of existing categories by selecting a category and then clicking Move
Up or Move Down.
Once you have finished adding a category, the new category becomes available in the Category box of the Action
Properties dialog box.
Configuring Actions | 31

Change of the Location of an Action in a Category


When you add an action on the Actions page, you specify the category on the More menu where the menu
command corresponding to the action will be displayed. By default, the action is added to the Other category. You
can change the location of the action in a category or on the form toolbar by doing the following:
1. In the navigation pane of the Customization Project Editor, click Actions under the screen node you want to
customize. The Actions page opens.
2. On the page toolbar, click Reorder Actions.
3. In the Reorder Actions dialog box, which opens, in the Category box, select the category where the action
is located.
The actions located in the selected category are displayed in the dialog box.
4. Select the action you want to move.
5. Change the location of the selected action by using the Move Up and Move Down actions on the table
toolbar.
6. Click OK to close the dialog box.

Action Configuration: To Add a Category to the More Menu

The following activity will walk you through the process of adding a category to the More menu.

Story
Suppose that you want to add all the actions in the new workflow for the Task (CR306020) form to the Processing
category of the More menu. However, this form does not have any categories specified for the menu, and the More
menu is not displayed. Acting as the system administrator, you need to add a category to the More menu of this
form.

Process Overview
In this activity, you will use the Actions page to add the Processing category to the More menu.

System Preparation
Before you begin adding a category to the More menu, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have completed the Workflow Elements: To Add a Dialog Box activity.

Step: Adding a Category to the More menu


To add the Processing category, do the following in the Customization Project Editor for the TaskWorkflow project:
1. In the navigation pane, click Screens > CR306020 > Actions.
Configuring Actions | 32

The CR306020 (Task) Actions page opens.


2. On the More menu (under Actions), click Manage Categories.
3. In the Manage Categories dialog box, which is opened, click Add Category.
4. In the New Category dialog box, which is opened, specify the following settings:
• Category Name: Processing
• Display Name: Processing
5. Click OK to close the dialog box.
6. In the Manage Categories dialog box (to which you return), click OK to close the dialog box and save your
changes.

You have added a category to the More menu on the Task (CR306020) form.

Action Configuration: To Add Actions to the Dra and Processing States

The following activity will walk you through the process of adding actions to the Dra and Processing states of the
workflow.

Story
Acting as the system administrator, you need to add new actions to the Dra state. You also need to add existing
actions to the Processing state.

Process Overview
By using the Actions page, you will create the needed actions. By using the Workflow (Tree View) page, you will add
the actions to the workflow state.

System Preparation
Before you begin adding actions to the workflow states, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have completed the Action Configuration: To Hide Unneeded Actions activity.

Step 1: Creating the Actions


The Dra state should contain two actions that trigger transitions to the Open state and to the Postponed state. To
create the Open and Postpone actions, do the following in the Customization Project Editor for the TaskWorkflow
project:
1. In the navigation pane, click Screens > CR306020 > Actions.
The CR306020 (Task) Actions page opens.
2. On the page toolbar, click Create New Action.
3. In the Action Properties dialog box, which is opened, specify the following settings:
Configuring Actions | 33

• Action Name: Open


• Display Name: Open
• Action Type: Workflow
• Category: Processing
• Display on Toolbar: If Available
This setting indicates that this action will be displayed as a button on the form toolbar and under a
category on the More menu (Processing in this case) if the action is available for a record based on its
state.
4. Click OK to close the dialog box and save your changes.
5. By using instructions (and settings, except for the action and display names) that are similar to the previous
three instructions, create the Postpone action.

Step 2: Adding the Created Actions to the Dra State


To add the created actions to the Dra state, do the following:
1. In the navigation pane, click Screens > CR306020 > Workflows > Task.
The CR306020 (Task) State Diagram: Task page opens.
2. In the States and Transitions pane, click the Dra state.
3. On the Actions tab, click Add Row on the table toolbar, and specify the following settings in the added row:
• Active: Selected
• Action: Open (Open)
• Duplicate on Toolbar: Selected
This setting indicates that the button associated with this action will be displayed on the form toolbar, in
addition to the associated command being displayed under Processing on the More menu.
• Connotation: Success
Because the Open action is the main action (command) in the Dra state, you are specifying this
connotation for it. As a result, the system will highlight the associated button and command in green.
4. On the Actions tab, click Add Row on the table toolbar again, and specify the following settings in the
added row:
• Active: Selected
• Action: Postpone (Postpone)
• Duplicate on Toolbar: Cleared
5. Save your changes.

Step 3: Adding Actions for the Processing State


To trigger the transitions from the Processing state to the Complete state and the Postponed state, you will use the
existing Complete and Postpone actions. Do the following:
1. In the navigation pane, click Screens > CR306020 > Workflows > Task.
The CR306020 (Task) State Diagram: Task page opens.
2. In the States and Transitions pane, click the Processing state.
3. On the Actions tab, click Add Row on the table toolbar, and specify the following settings in the added row:
• Active: Selected
• Action: Complete (Complete)
• Duplicate on Toolbar: Selected
Configuring Actions | 34

• Connotation: Success
4. On the Actions tab, click Add Row on the table toolbar again, and specify the following settings in the
added row:
• Active: Selected
• Action: Postpone (Postpone)
• Duplicate on Toolbar: Cleared
5. Save your changes.

You have created new actions and added them to the states of the workflow that you created for the Task
(CR306020) form. You have also added existing actions to a state of the workflow.

Action Configuration: To Add Actions to the Open State

The following activity will walk you through the process of adding actions to the Open state of the workflow.

Story
Acting as the system administrator, you will create an action and modify an existing action. You will then add these
action to the Open state.

Process Overview
You will modify the Open state of the workflow to contain the following actions:
• The StartWork action, which you will create. This action will trigger a transition to the Processing state.
• The existing Complete action, which will trigger a transition to the Completed state.
• The existing Postpone action, which will trigger a transition to the Postponed state.

System Preparation
Before you begin adding actions to the workflow state, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have completed the Action Configuration: To Add Actions to the Draft and Processing
States activity.

Step 1: Creating an Action


To trigger the transition from the Open state to the Processing state, you will create the StartWork action. Do the
following in the Customization Project Editor for the TaskWorkflow project:
1. In the navigation pane, click Screens > CR306020 > Actions.
The CR306020 (Task) Actions page opens.
2. On the page toolbar, click Create New Action.
3. In the Action Properties dialog box, which is opened, specify the following settings:
Configuring Actions | 35

• Action Name: StartWork


• Display Name: Start Work
• Action Type: Workflow
• Category: Processing
• Duplicate on Toolbar: If Available
4. Click OK to close the dialog box and save your changes.

Step 2: Modifying an Existing Action


To trigger the transition from the Open state to the Completed state, you will use the existing Complete action, and
you will add this action to the Processing category. Do the following:
1. While you are still on the CR306020 (Task) Actions page, on the More menu (under Actions), click Add
Existing Action.
2. In the Action Properties dialog box, which is opened, specify the following settings:
• Action Name: Complete
• Category: Processing
• Display on Toolbar: As Configured in Graph (selected automatically)
This setting indicates that the action will be displayed according to the properties of the PXButton
attribute.
3. Click OK to close the dialog box and save your changes.

Step 3: Adding Actions to the Open State


To add the Start Work, Complete, and Postpone actions to the Open state, do the following:
1. In the navigation pane, click Screens > CR306020 > Workflows > Task.
The CR306020 (Task) State Diagram: Task page opens.
2. In the States and Transitions pane, click the Open state.
3. On the Actions tab, click Add Row on the table toolbar, and specify the following settings in the added row:
• Active: Selected
• Action: Start Work (StartWork)
• Duplicate on Toolbar: Selected
This setting indicates that the button associated with this action will be displayed on the form toolbar, in
addition to the associated command being displayed under Processing on the More menu.
• Connotation: Success
Because the Start Work action is the main action in the Open state, you are specifying this connotation for
it. As a result, the system will highlight the associated button and command in green.
4. On the Actions tab, click Add Row on the table toolbar again, and specify the following settings in the
added row:
• Active: Selected
• Action: Complete (Complete)
• Duplicate on Toolbar: Cleared
5. On the Actions tab, click Add Row on the table toolbar again, and specify the following settings in the
added row:
• Active: Selected
• Action: Postpone (Postpone)
Configuring Actions | 36

• Duplicate on Toolbar: Cleared


6. Save your changes.

You have created new actions, modified an exiting action, and added these actions to a state of the workflow you
have defined for the Task (CR306020) form.

Action Configuration: To Add Actions to the Completed State and to the Postponed
State

The following activity will walk you through the process of adding actions to the Completed and Postponed states of
the workflow.

Story
When a task has the Completed state, only one action should be available: the Reopen action. When a user clicks the
Reopen button or command, you want the system to display the Reopen dialog box, in which the user must specify
the percent of the task completion.
When a task has the Postponed state, only one action should be available: Open. When a user clicks the button or
command associated with this action, the task needs to be assigned one of the following statuses:
• Open if the value in the Completion (%) box is 0
• Processing if the value in the Completion (%) box is not 0
Acting as the system administrator, you need to create an action and add it to the Completed state. You also need to
add an existing action to the Postponed state.

Process Overview
You will create an action and add it to the Completed state.
You will add an existing action to the Postponed state.

System Preparation
Before you begin adding actions to the workflow states, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have completed the Action Configuration: To Add Actions to the Open State activity.

Step 1: Creating a New Action


To create the Reopen action, do the following in the Customization Project Editor for the TaskWorkflow project:
1. In the navigation pane, click Screens > CR306020 > Actions.
The CR306020 (Task) Actions page opens.
2. On the page toolbar, click Create New Action.
3. In the Action Properties dialog box, which is opened, specify the following settings:
Configuring Actions | 37

• Action Name: Reopen


• Display Name: Reopen
• Dialog Box: Details(FormReopen)
• Action Type: Workflow
• Category: Processing
4. Click OK to close the dialog box and save your changes.

Step 2: Adding the New Action to the Completed State


To add the Reopen action to the Completed state, do the following:
1. In the navigation pane, click Screens > CR306020 > Workflows > Task.
The CR306020 (Task) State Diagram: Task page opens.
2. In the States and Transitions pane, click the Completed state.
3. On the Actions tab, click Add Row on the table toolbar, and specify the following settings in the added row:
• Active: Selected
• Action: Reopen (Reopen)
4. Save your changes.

Step 3: Adding an Action to the Postponed State


To add the Open action to the Postponed state, while you are still working on the CR306020 (Task) Actions page, do
the following:
1. In the States and Transitions pane, click the Postponed state.
2. On the Actions tab, click Add Row, and specify the following settings in the added row:
• Active: Selected
• Action: Open (Open)
3. Save your changes.

You have created a new action and added it to a state of the workflow you have created for the Task (CR306020)
form. You have also added an exiting action to a state of the workflow.
Configuring Conditions and Transitions | 38

Configuring Conditions and Transitions


In this chapter, you will learn how to use conditions in a workflow. You can use conditions to specify when actions
should be performed, when transitions should be triggered, and when certain fields are available on the form
based on the status of the record. You will also learn how to configure transitions between workflow states.

Conditions and Transitions: General Information

You can use conditions to specify when actions should be performed and when transitions should be triggered. By
using conditions, you can control when particular fields should appear on the form as well as what properties the
fields have based on particular settings of the record.

Learning Objectives
In this chapter, you will learn how to do create conditions that will be used to modify actions. You will also learn
how to add transitions between the states of the workflow.

Applicable Scenarios
Aer you add states to the workflow, you need to configure transitions between these states. You use conditions to
specify when particular transitions should be performed.

Construction of a Condition
You use the Conditions page of the Customization Project Editor to construct a condition that can later be specified
as a property value for the following items on a particular form:
• A UI control
• An action, including an auto-run action
• A transition
You open the Conditions page by clicking Conditions under the screen ID (of the form for which you are
constructing the condition) in the navigation pane of the Customization Project Editor.
The following screenshot shows the Conditions page for the Opportunities (CR304000) form.

In the name that appears on the page, Conditions: is followed by the screen ID and then the screen
name in parentheses, so you can always see at a glance which form you are customizing. Notice that
the page name shown in the screenshot is Conditions: CR304000 (Opportunities).
Configuring Conditions and Transitions | 39

Figure: The Conditions page

When you click a link in the Condition Name column in the table, the Condition Properties dialog box is opened,
which shows the rows that make up the condition. You can add new rows and modify existing rows of the
conditions that you have created previously.

Configuration of Transitions
You configure transitions on the Workflow (Tree View) page of the workflow. The added transitions are displayed
on the States and Transitions pane of this page. You add new transitions by clicking Add Transition on the More
menu of the page. Aer adding the transitions, you can click Move Up or Move Down on the pane toolbar of the
States and Transitions pane to change their location.
The following screenshot shows transitions the States and Transitions pane for the opportunity workflow.
Configuring Conditions and Transitions | 40

Figure: The State and Transitions pane

On the Workflow (Diagram View) page, you add a transition between two states in one of the following ways:
• By clicking Add Transition on the page toolbar
• By clicking the plus button in a box with a state and drawing a line from it to another state
• By clicking an action or an event handler of a state and drawing a line from it to the required state

Conditions and Transitions: To Add Conditions

The following activity will walk you through the process of creating conditions that modify actions.

Story
In your workflow for tasks created on the Task (CR306020) form, you need the system to perform the Complete
action automatically when the Completion (%) is set to 100, which reflects that the task is complete. You also want
to the Open action to trigger transitions to different states depending on the percent of the task completion. In this
activity, you will start this process by creating the conditions.

Process Overview
You will use the Conditions page to add conditions that you will later use to modify the Complete and Open actions.

System Preparation
Before you begin adding conditions, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.
Configuring Conditions and Transitions | 41

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have completed the Action Configuration: To Add Actions to the Completed State and to the
Postponed State activity.

Step 1: Adding the Completed Condition


In this step, you will add the Completed condition, which you will later use to invoke the Complete action
automatically. Perform the following instructions in the Customization Project Editor for the TaskWorkflow project:
1. In the navigation pane, click Screens > CR306020 > Conditions.
The Conditions: CR306020 (Task) page opens.
2. On the page toolbar, click Add New Record.
3. In the Conditions Properties dialog box, which is opened, type Completed as the condition name.
4. Click Add Row on the table toolbar, and specify the following settings in the added row:
• Field Name: Completion (%)
• Condition: Equals
• From Schema: Selected
• Value: 100
5. Make sure that the Active check box is selected for the added row.
6. Click OK to save your changes and close the dialog box.
The added condition appears in the list of conditions on the Conditions: CR306020 (Task) page. You will use
this condition to automatically change the status of a task to Completed when the condition is met.

Step 2: Adding the NotStarted Condition


In this step, you will add the NotStarted condition, which you will later use in the Open action to trigger transitions
to different states. Perform the following instructions:
1. While you are still on the Conditions: CR306020 (Task) page, on the page toolbar, click Add New Record.
2. In the Conditions Properties dialog box, which is opened, type NotStarted as the condition name.
3. Click Add Row on the table toolbar, and specify the following settings in the added row:
• Field Name: Completion (%)
• Condition: Equals
• From Schema: Selected
• Value: 0
4. Make sure that the Active check box is selected for the added row.
5. Click OK to save your changes and close the dialog box.
The added condition appears in the list of conditions on the Conditions: CR306020 (Task) page. You will use
this condition to change the status of a task from Postponed to Open when the condition is met.

You have created the conditions that will be used for the actions in the workflow of the Task (CR306020) form.
Configuring Conditions and Transitions | 42

Conditions and Transitions: To Add Transitions

The following activity will walk you through the process of creating transitions between the states of the workflow.

Story
You can use the same action to trigger transitions from one state to different states. To do so, you need to use
conditions for these transitions. If a condition is fulfilled, the system performs the transition that is first in the list
of transitions from the current state. (This list is displayed on the States and Transitions pane of the Workflow
(Tree View) page.) If the condition is not fulfilled, the system switches to the next transition in the list and checks its
condition.
In the Postponed state, you will use the same action (the Open action) to trigger transitions to the Open state or to
the Processing state, depending on the percent of the task completion as follows:
• If the value in the Completion (%) box is 0, the target state should be Open.
• If the value in the Completion (%) box is not 0, the target state should be Processing.
To implement these transitions, you will use the NotStarted and Completed conditions that you have created in
Conditions and Transitions: To Add Conditions.

Process Overview
By using the Workflow (Tree View) page, you will add the transitions from the Dra state to the Open state and the
Postponed state. You will also add the transitions from the Open state to the Processing state, the Postponed state,
and the Completed state. (You have created the conditions that you will use in these transitions, in Conditions and
Transitions: To Add Conditions.)

System Preparation
Before you begin adding transitions to the workflow, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have completed the activity Conditions and Transitions: To Add Conditions activity.

Step 1: Adding the Transitions from the Dra State


To add the transitions from the Dra state to the Open state and the Postponed state, in the Customization Project
Editor for the TaskWorkflow project, perform the following instructions:
1. In the navigation pane, click Screens > CR306020 > Workflows > Task.
The CR306020 (Task) Workflows page opens.
2. In the States and Transitions pane, click the Dra state.
3. On the More menu (under Actions), click Add Transition.
4. In the Add Transition dialog box, which is opened, specify the following settings:
• Trigger Name: Open (Open)
Configuring Conditions and Transitions | 43

• Target State: Open


5. Click OK to close the dialog box.
Notice that the transition has appeared in the States and Transitions pane, in the Transitions node below
the Dra state.
6. Save your changes.
7. In the States and Transitions pane, click the Dra state again.
8. On the More menu (under Actions), click Add Transition.
9. In the Add Transition dialog box, which is opened, specify the following settings:
• Trigger Name: Postpone (Postpone)
• Target State: Postponed
10.Click OK to close the dialog box.
11.Save your changes.

Step 2: Adding the Transitions from the Open State


In this step, you will add the transitions from the Open state to the Processing state, the Postponed state, and the
Completed state. While you are still in the tree view of the CR306020 (Task) State Diagram: Task page, perform the
following instructions:
1. In the States and Transitions pane, click the Open state.
2. On the More menu (under Actions), click Add Transition.
3. In the Add Transition dialog box, which is opened, specify the following settings:
• Trigger Name: Start Work (StartWork)
• Target State: Processing
4. Click OK to close the dialog box.
Notice that the transition has appeared in the States and Transitions pane, in the Transitions node below
the Open state.
5. In the States and Transitions pane, click the Open state again.
6. On the More menu (under Actions), click Add Transition.
7. In the Add Transition dialog box, which is opened, specify the following settings:
• Trigger Name: Postpone (Postpone)
• Target State: Postponed
8. Click OK to close the dialog box.
9. In the States and Transitions pane, click the Open state again.
10.On the More menu (under Actions), click Add Transition.
11.In the Add Transition dialog box, which is opened, specify the following settings:
• Trigger Name: Complete (Complete)
• Target State: Completed
12.Click OK to close the dialog box.
13.Save your changes.
Configuring Conditions and Transitions | 44

Step 3: Adding the Transitions from the Processing State


To add the transitions from the Processing state to the Completed state and the Postponed state, while you are still
in the tree view of the CR306020 (Task) State Diagram: Task page, perform the following instructions:
1. In the States and Transitions pane, click the Processing state.
2. On the More menu (under Actions), click Add Transition.
3. In the Add Transition dialog box, which is opened, specify the following settings:
• Trigger Name: Postpone (Postpone)
• Target State: Postponed
4. Click OK to close the dialog box.
Notice that the transition is added to the States and Transitions pane, to the Transitions node below the
Processing state.
5. In the States and Transitions pane, click the Processing state again.
6. On the More menu (under Actions), click Add Transition.
7. In the Add Transition dialog box, which is opened, specify the following settings:
• Trigger Name: Complete (Complete)
• Target State: Completed
8. Click OK to close the dialog box.
9. In the States and Transitions pane, click the Processing state again.
10.On the Actions tab, in the row with the Complete (Complete) action, select Completed in the Auto-Run
Action column.
This setting indicates that the system will perform this action automatically if the Completed condition is
fulfilled.
11.Save your changes.

Step 4: Adding the Transitions from the Postponed State


To implement transitions from the Postponed state, while you are still in the tree view of the CR306020 (Task) State
Diagram: Task page, do the following:
1. In the States and Transitions pane, click the Postponed state.
2. On the More menu (under Actions), click Add Transition.
3. In the Add Transition dialog box, which is opened, specify the following settings:
• Trigger Name: Open (Open)
• Target State: Open
• Condition: NotStarted
4. Click OK to close the dialog box.
5. In the States and Transitions pane, click the Postponed state again.
6. On the More menu (under Actions), click Add Transition.
7. In the Add Transition dialog box, which is opened, specify the following settings:
• Trigger Name: Open (Open)
• Target State: Processing
8. Click OK to close the dialog box.
Configuring Conditions and Transitions | 45

The system will perform this transition if the previous condition (NotStarted) is not fulfilled.
9. Save your changes.

Step 5: Adding the Transitions from the Completed State


To add the transitions from the Completed state to the Open state, while you are still in the tree view of the
CR306020 (Task) State Diagram: Task page, perform the following instructions:
1. In the States and Transitions pane, click the Completed state.
2. On the More menu (under Actions), click Add Transition.
3. In the Add Transition dialog box, which is opened, specify the following settings:
• Trigger Name: Reopen (Reopen)
• Target State: Open
4. Click OK to close the dialog box.
5. In the Transitions node of the States and Transitions pane, click the added transition.
6. In the Fields to Update Aer Transition table of the Transition Properties tab, click Add Row on the table
toolbar, and specify the following settings in the added row:
• Field Name: Completion (%)
• From Schema: Cleared
• New Value: [FormReopen.Completion]
The last setting indicates that the Completion (%) field will be updated with the value that the user has
specified in the Details dialog box. (You have created this dialog box in Workflow Elements: To Add a Dialog
Box.)
7. Save your changes.

You have added transitions between the states of the workflow for the Task (CR306020) form.
Testing the Customization | 46

Testing the Customization


In this chapter, you will learn how to test the workflow customization you have created for the Task (CR306020)
form. You need to publish the customization project before performing these tests on the form.

Testing of the Customization: General Information

To make sure that you have implemented all changes correctly, you need to test your customization project.

Learning Objectives
In this chapter, you will learn how to test your customization project.

Applicable Scenarios
You test your customization project aer you have added all the required data to it. Also, you can run the test each
time you make changes to the project.

Application of Changes from the Customization Project


You test the changes you have made to a form by publishing the customization project. If you are already signed in
to Acumatica ERP and the form is open, you need to refresh it.. You then need to perform the activities that involve
the changes to make sure that the customized form works as expected.
You can publish your customization project from the Customization Project Editor or on the Customization Projects
(SM204505) form.
If you have previously published another customization project that modifies the current form and you do not need
these changes, you need to unpublish this customization project before publishing the current one.
For details on publishing and unpublishing a customization project, see To Publish a Single Project and To Unpublish
a Customization.

Testing of the Customization: To Test the Task Workflow

The following activity will walk you through the process of testing the workflow that you have created for the Task
(CR306020) form during the completion of previous activities.

Story
Acting as the system administrator, you need to publish your customization project and then test the changes on
the Task (CR306020) form and make sure that the new workflow works as expected.

Process Overview
On the Customization Projects (SM204505) form of Acumatica ERP, you will publish your customization project. On
the Task (CR306020) form, you will then test the new workflow.
Testing the Customization | 47

System Preparation
Before you begin testing the customization, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have completed the Conditions and Transitions: To Add Transitions activity.

Step 1: Publishing the Customization Project


To publish the TaskWorkflow customization project, do the following:
1. On the Customization Projects (SM204505) form, click the TaskWorkflow project name to open the
customization project.
2. On the menu of the Customization Project Editor, click Publish > Publish Current Project.
The system starts publishing the customization project and displays the progress in the Compilation pane,
which appears at the bottom of the Customization Project Editor window.
3. Aer the system finishes updating the required data, click Close Compilation Pane in the Compilation
pane.
4. Go to the Tasks (EP404000) form.

Step 2: Testing the Dra State and State Diagram Dialog Box
In Acumatica ERP, test the Dra state and the State Diagram dialog box as follows:
1. On the form toolbar of the Tasks (EP404000) form, click Add Task.
2. On the Task (CR306020) form, which opens, notice the following:
• The value in the Status box is Dra.
• The Start Date box has been filled in automatically with the current date.
• The Completion (%) box is unavailable.
• On the More menu (under Processing), two commands are available: Open and Postpone. Also notice
that Open is marked with a green dot.
• On the form toolbar, the Open button is highlighted in green.
3. On the form title bar, click Customization > Show State Diagram.
The State Diagram dialog box opens. The diagram should look like the one shown in the following
screenshot.
Testing the Customization | 48

Figure: The State Diagram dialog box

4. Close the dialog box.

Step 3: Testing the Open State


While you are still on the Task (CR306020) form, test the Open state as follows:
1. In the Summary box, enter Process customer request, and save your changes.
2. On the form toolbar, click Open.
The status of the task changes to Open.
3. Clear the Owner box, and try to save your changes.
The system displays an error for this box.
4. In the Owner box, select Kimberly Gibbs, and save your changes.
5. On the form, notice the following:
• On the More menu, three commands are available: Start Work, Complete, and Postpone.
• On the form toolbar, the Start Work button is highlighted in green.

Step 4: Testing the Processing State and the Complete Action


Test the Processing state and the Complete action as follows:
1. While you are still on the Task (CR306020) form, on the form toolbar, click Start Work.
2. On the form, notice the following:
• The status of the task has been changed to Processing.
• On the More menu, two commands are available: Complete and Postpone.
• On the form toolbar, the Complete command is highlighted in green.
3. On the form toolbar, click Complete.
The Task form closes, and the Tasks form is opened so that you can view the list of tasks again.
4. On the Tasks form, switch to the All Tasks tab, and click the task with Process customer request task.
5. On the form, which opens, notice the following:
• The status of the task is Completed.
Testing the Customization | 49

• On the More menu, only one command is available: Reopen.

Step 5: Testing the Reopen Action and the Completed Condition


While you are still on the Task (CR306020) form, test the Reopen action and the Completed condition as follows:
1. On the More menu, click Reopen.
2. In the Details dialog box, which is opened, enter 10 in the Completion (%) box.
3. Click OK to close the dialog box.
The status of the task changes to Open, and the value in the Completion (%) box is 10.
4. On the More menu, click Postpone.
The status of the task changes to Postponed, and on the More menu, only one command is available: Open.
5. On the More menu, click Open.
The status of the task changes to Processing because the value in the Completion (%) box is 10 (which is
greater than 0).
6. In the Completion (%) box, enter 100.
7. Save your changes.
The status of the task changes to Completed automatically.

You have fully tested the changes in your published customization project.
Working with Predefined Workflows | 50

Working with Predefined Workflows


In this chapter, you will learn about predefined workflows, which are workflows that are provided as part of
Acumatica ERP for forms. You do not customize a predefined workflow directly, instead you customize an inherited
workflow, which is based on the predefined workflow. Customizing an inherited workflow can save you time over
creating a custom workflow from scratch, especially if you want to make only minor changes to the functionality of
predefined workflow.

Inherited Workflows: General Information

Some Acumatica ERP forms have at least one predefined workflow, which is a workflow that has been developed
for a form in the out-of-the-box version of Acumatica ERP. These predefined workflows are read-only. To customize
a predefined workflow, you add a workflow based on a predefined workflow.
If you don't need to define a custom workflow from scratch, you can create an inherited workflow that is based on
the predefined workflow for the form.

An inherited workflow is also described as a customized workflow. These terms are interchangeable
and they both describe facets of this workflow: It inherits its settings from the predefined workflow,
and it is a customized version of the predefined workflow.

Learning Objectives
In this chapter, you will learn how to work with inherited workflows, which are based on predefined workflows for
the applicable forms.

Applicable Scenarios
You create an inherited workflow if you need to make changes to the predefined workflow so that it is better suited
for your business processes. This approach is especially useful when you do not want to create a workflow from
scratch.

The Workflow Page for a Predefined Workflow


To review a predefined workflow, you can use the Workflow (Tree View), described in this section, or the Workflow
(Diagram View) (for details, see Diagram View: General Information.)

The Workflow (Tree View) page has the same parts for predefined workflows as it does for custom or inherited
(customized) workflows. Because it is not possible to edit the predefined workflows, the following commands are
unavailable in the tree view of the page:
• On the page toolbar and the More menu:
• Save
• View Changes
• Add State
• Add Predefined State
• Add Transition
• On the pane toolbar of the States and Transitions pane:
• Remove
• Move Up
Working with Predefined Workflows | 51

• Move Down
The following screenshot shows the Workflow (Tree View) for the Leads (CR301000) form. Notice that the page name
is CR301000 (Leads) State Diagram: Default Workflow. The screen number and its name (in parentheses) precede
State Diagram, which is followed by a colon and Default workflow.

If a particular screen has only one predefined workflow, the workflow name of the predefined
workflow is Default workflow. If the screen has multiple predefined workflows, different workflow
names are assigned to each predefined workflow.

Figure: The tree view of the Workflow page with the predefined workflow

Inherited Workflows
An inherited (customized) workflow based on a predefined workflow inherits all modifications of the predefined
workflow. You can view the difference between the predefined workflow and the inherited workflow, and cause the
inherited workflow to revert to the predefined workflow.
If a predefined workflow is changed in an upgrade aer the development of any inherited workflows based on
the predefined workflow, each of these workflows will inherit the changes. If a customization project contains an
inherited workflow based on a predefined workflow and a newer version of the predefined workflow is available
in Acumatica ERP, a customizer can upgrade the inherited predefined workflow with the latest changes from the
system.
For details on upgrading an inherited workflow based on a predefined workflow with the latest changes in the
system, see Upgrade of a Workflow: General Information.

Forms with Predefined Workflows


As of Acumatica ERP 2022 R2, the following forms have predefined workflows:
• Leads (CR301000)
• Cases (CR306000)
• Opportunities (CR304000)
• Shipments (SO302000)
Working with Predefined Workflows | 52

• Sales Orders (SO301000)


• Purchase Orders (PO301000)
• Purchase Receipts (PO302000)
• Landed Costs (PO303000)
• Quick Checks (AP304000)
• Bills and Adjustments (AP301000)
• Checks and Payments (AP302000)
• Batch Payments (AP305000)
• Vendor Price Worksheets (AP202010)
• Invoices and Memos (AR301000)
• Invoices (SO303000)
• Payments and Applications (AR302000)
• Cash Sales (AR304000)
• Sales Price Worksheets (AR202010)
• Customer Contracts (CT301000)
• Trial Balance (GL303010)
• Journal Vouchers (GL304000)
• Journal Transactions (GL301000)
• Tax Adjustments (TX301000)
• Tax Bills and Adjustments (TX303000)
• Cash Transactions (CA304000)
• Funds Transfers (CA301000)
• Bank Deposits (CA305000)
• Reconciliation Statements (CA302000)
You can add inherited workflows for any of these forms.

Inherited Workflows: Customization of the Opportunity Workflow

If the predefined workflow for a form does not fit your business processes, you might want to make modifications
to it. This topic describes this process using the example of the Opportunities (CR304000) form.

Overview of the Customized Workflow for the Opportunities Form


The predefined workflow for the Opportunities (CR304000) form includes the states, actions, and transitions shown
in the following screenshot.
Working with Predefined Workflows | 53

Figure: The predefined workflow for opportunities

Suppose that in your customization efforts, you need to incorporate a process of assigning a new opportunity
before giving it the Open status. You need a new status, Assigned, for opportunities. A user should be able to do the
following:
• Change the status from New to Assigned by clicking the Assign action on the Opportunities form. For an
opportunity to be assigned, its owner must be selected in the Owner box.
• Change the status from Assigned to Open by clicking Accept on the form.
• Change the status from Assigned to New by clicking Reject, which you will add to the form.
Also, you need to add an hidden action named Auto-Assign, which is performed automatically if the Owner box
is filled and the opportunity has the New status. The Auto-Assign action changes the status of the opportunity to
Assigned.
When a user clicks Accept or Reject, the user should provide the reason for changing the state. When a user clicks
Assign, the user should specify the Owner of the opportunity. In both of these situations, you will use a dialog box
to obtain the needed setting.
The modified workflow would look like the one shown in the following screenshot.
Working with Predefined Workflows | 54

Figure: The modified workflow for opportunities

Inherited Workflows: To Create an Inherited Workflow

The following activity will walk you through the process of adding the Opportunities (CR304000) form to the list of
customized screens and adding an inherited workflow for it based on a predefined one.

This activity is based on the U100 dataset. If you are using another dataset, or if any system settings
have been changed in U100, these changes can affect the workflow of the activity and the results of
the processing. To avoid any issues, restore the U100 dataset to its initial state.

Story
Acting as the system administrator, you need to create a customized workflow for the Opportunities (CR304000)
form.

Process Overview
You will add the Opportunities (CR304000) form to the list of customized screens on the Customized Screens page of
the Customization Project Editor. You will then use the Opportunities form as a starting point to create a customized
workflow for this form on the Workflows page. From this page, you will open the Workflow (Diagram View) page for
the inherited workflow.

System Preparation
Before you begin performing this activity, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Unpublish your current customization project or projects by doing the following:


a. Open the Customization Projects (SM204505) form.
Working with Predefined Workflows | 55

b. On the More menu (under Publish), click Unpublish All.


For details on how to unpublish a customization project, see To Unpublish a Customization.
3. On the Customization Projects (SM204505) form, create a customization project named Opportunities.

Step 1: Adding a Form to the List of Customized Screens


Add the Opportunities (CR304000) form to the list of customized screens as follows:
1. Open the Opportunities form.
2. On the form title bar, click Customization > Show State Diagram.
3. In the State Diagram dialog box, which opens, notice the predefined workflow of the form, which is shown.
Click Customize Workflow.
4. In the Select Customization Project dialog box, which opens, select the Opportunities customization
project.
5. Click OK to close the dialog box.
The CR304000 (Opportunities) Workflows page of the Customization Project Editor opens with the list
of workflows for this screen. Notice that the list contains one workflow: Default Workflow. This is the
predefined workflow of the form.

Step 2: Creating a Customized Workflow


Create a customized workflow for the Opportunities (CR304000) form as follows:
1. On the page toolbar of the CR304000 (Opportunities) Workflows page, which you opened in the previous
step, click Add Workflow.
2. In the Add Workflow dialog box, which opens, specify the following settings:
• Operation: Extend System Workflow
This is the operation you select when you want to create an inherited workflow based on another
workflow.
• Base Workflow: Default Workflow
This is the specific workflow that will be extended for the inherited workflow that you are creating.
Although this screen has one workflow, others have several.
• Workflow Type: DEFAULT
This is the type of the base workflow that will be extended for the inherited workflow.
• Workflow Name: OpportunitiesAssigned (the name of the workflow that will be displayed on the
UI)
3. Click OK to close the dialog box.
A row for the workflow appears in the table on the Workflows page. Notice that the workflow’s status is
Inherited.
4. Select the Active check box for the created workflow.
Notice that the Active check box has been cleared automatically for the predefined workflow (Default
Workflow). This means that the system will not use this workflow for the form anymore, aer the
customization project is published.
5. On the page toolbar, click Save.
6. In the table, click the link in the Workflow Name column for the created workflow. The tree view of the
CR304000 (Opportunities) State Diagram: OpportunitiesAssigned page opens.
7. On the page toolbar, click Diagram View.
Working with Predefined Workflows | 56

In future activities, you will use the diagram view of the workflow to customize the workflow that you have
created.

You have added a screen to the list of customized screens and created an inherited workflow for it.
Customizing Workflows with the Diagram View | 57

Customizing Workflows with the Diagram View


In the topics of this chapter, you will learn how to customize a predefined workflow by using the diagram
view of the Workflow page (also referred to as the Workflow Visual Editor). The diagram view provides visual
representations of the states, actions, and transitions of the workflow.

Diagram View: General Information

In addition to using the Workflow (Tree View) page, you can use the Workflow (Diagram View) page (also referred to
as the Workflow Visual Editor) to work with a particular workflow. The diagram view is structured like a traditional
workflow, with visual representations of the states of the record and the transitions between them. To access the
diagram view, while you are working with the tree view of the particular inherited, custom, or predefined workflow
on the page, you click Diagram View on the page toolbar.

For a workflow with composite states, the diagram view is not available—that is, the Diagram View
button is not displayed on the More menu of the Workflow (Tree View) page.

Learning Objectives
In this chapter, you will learn about the use of the Workflow (Diagram View) to customize workflows.

Applicable Scenarios
You use the Workflow (Diagram View) page to create or modify workflows if you prefer to use a visual representation
of a workflow instead of its tree view.

Parts of the Diagram View


The diagram view of the Workflows page contains the following parts, as you can see in the screenshot below:
• The page toolbar and More menu with various buttons and commands.
• The main area, which displays the workflow of the selected form as a diagram and has the following
elements:
• Boxes that contain the names of the states of the record created by using the form and labels with the
names of the actions or event handlers that trigger the transitions. The labels appear aer you create a
transition and specify the source and target states. For example, in the screenshot below, the New box
reflects the New state (which is the status on the form) for a case, and the labels within the New box (such
as Open and Pending Customer) reflect the actions a user can perform while the case has the New state.

Actions and event handlers for the current state are not displayed if they do not trigger any
transitions.

• Arrows that show the transitions between the states. For example, Item 1 in the following screenshot
shows an arrow that represents a transition from the Open state to the Pending Customer state of a case
that has been created on the Cases (CR306000) form.
• Buttons that are shown to the right of the diagram: Zoom In or Zoom Out (Item 2), Reset Scale to 100%
(Item 3), Fit Screen (Item 4), and Collapse All/Expand All (Item 5).
Customizing Workflows with the Diagram View | 58

Figure: The parts of the diagram view

In the diagram view of the Workflow page, a box with a state contains the following elements:
• Arrow: You click an arrow (see Item 6 in the screenshot above) to expand or collapse the list of actions or
event handlers that trigger transitions for this state.
• More button: You click the More button in the upper-right corner of the box (Item 7) to open the More menu,
which has the following commands:
• Edit State: Opens the State dialog box, which you can use to modify the state.
• Add Transition: Opens the Add Transition dialog box, which you can use to add a transition from the
current state to another state. In the dialog box, you specify the target state and the action or event
handler that causes the transition to the state.
• Delete State: Deletes the state. When you select this command, you need to confirm the deletion in the
dialog box that is opened.
• Plus button: You click a plus button (Item 8) to manually draw a transition line for an action or an event
handler that does not yet have any outgoing transitions from the current state. This opens the Add
Transition dialog box with the Target State box filled in.
When the transition is created, the action or event handler that triggers it is added to the box with the
current state. This action or event handler has the name you have specified in the Trigger Name box of the
dialog box.
Notice in the screenshot that the page name is CR306000 (Cases) State Diagram: Default Workflow. The form number
and its name (in parentheses) precede State Diagram, which is followed by a colon and the workflow name of the
predefined workflow (Default Workflow in this case).

For a particular workflow, the tree view and diagram view of this page have the same page name.
Customizing Workflows with the Diagram View | 59

Parts of the Transitions


If a transition has a condition (that is, if the transition is performed only when a particular condition is met for the
record), a diamond icon is displayed above the transition (see Item 1 in the following screenshot).
If an action with a transition contains an auto-run condition (that is, a condition for which the action is triggered
automatically if the condition is met), a lightning rod icon is displayed above the transition (Item 2).
The transition lines are of the same color as the states they originate from, which makes it easier to distinguish
between transitions. Also, each transition has a dot that is of the same color as the target state of this transition
(Item 3).

Figure: Parts of the transitions

Diagram View: To Add a New State

The following activity will walk you through the process of adding a new state to the customized workflow you
created while performing the Inherited Workflows: To Create an Inherited Workflow activity.

Story
Acting as the system administrator, you need to add a new state to the opportunity workflow for the Opportunities
(CR304000) form. This state will correspond to the Assigned status of an opportunity created on this form.

Process Overview
By using the Workflow (Diagram View) page, you will add the Assigned state to the OpportunitiesAssigned workflow.
Customizing Workflows with the Diagram View | 60

System Preparation
Before you begin adding a new state, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have learned how to create states, as described in Workflow Creation: General Information
and Workflow Creation: Configuration of States.
3. Make sure that you have completed the Inherited Workflows: To Create an Inherited Workflow activity.

Step: Adding a State


To add a new state to the workflow, perform the following instructions in the Customization Project Editor for the
Opportunities customization project:
1. In the navigation pane, click Screens > CR304000 > Workflows > OpportunitiesAssigned.
The CR304000 (Opportunities) State Diagram: OpportunitiesAssigned page opens.
2. On the page toolbar, click Diagram View to begin working in the diagram view of the page.
3. On the page toolbar, click Add State.
4. In the Add State dialog box, which opens, specify the following settings:
• Identifier: A
• Description: Assigned
5. Click OK to close the dialog box.
A box with the new state is added to the diagram. Notice that there are no transitions between this state and
the predefined states.
6. Click Save on the page toolbar to save your changes.

You have added a new state to the workflow.

Diagram View: To Add New Actions and Transitions

The following activity will walk you through the process of adding new actions and transitions to the workflow.

Story
Acting as the system administrator, you need to create an action and add it to the Completed state. You also need to
add an existing action to the Postponed state.

Process Overview
By using the Workflow (Diagram View) page, you will add a transition from the Assigned state to the Open state,
and a transition from the Assigned state to the New state. You will then add a transition from the New state to the
Assigned state. By using the same page, you will also create the actions that trigger these transitions.
Customizing Workflows with the Diagram View | 61

System Preparation
Before you begin performing the steps of this activity, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have learned how to add actions and transitions, as described in Action Configuration:
General Information and Conditions and Transitions: General Information.
3. Make sure that you have completed the Diagram View: To Add a New State activity.

Step 1: Adding a Transition from the Assigned State to the Open State
In the diagram view of a workflow, you add transitions from one state to another by drawing lines between these
states.
In this activity, you will add a transition from the Assigned state to the Open state. In the Customization Project
Editor for the Opportunities customization project, perform the following instructions:
1. In the navigation pane, click Screens > CR304000 > Workflows > OpportunitiesAssigned.
The CR304000 (Opportunities) State Diagram: OpportunitiesAssigned page opens.
2. On the More menu (under Other), click Diagram View to switch to the diagram view of the workflow.
3. In the box with the Assigned state, click and hold the plus button, and draw a line from the box with the
Assigned state to the box with the Open state.
4. In the Add Transition dialog box, which opens, click Create to the right of the Trigger Name box to add a
new action.
5. In the New Action dialog box, which opens, specify the following settings:
• Action Name: Accept
• Display Name: Accept
• Category: Actions
This setting indicates that the action will be displayed under the Actions category of the More menu.
6. Click OK to close the dialog box.
7. In the Target State box of the Add Transition dialog box, make sure Open is selected, and click OK to close
the dialog box.
Notice that a label with the Accept action name has appeared in the box with the Assigned state. Also, an
arrow that represents the transition from the Assigned state to the Open state has appeared in the diagram.
8. Save your changes.

Step 2: Adding a Transition from the Assigned State to the New State
To add a transition from the Assigned state to the New state, while you are still working with the diagram view of the
CR304000 (Opportunities) State Diagram: OpportunitiesAssigned page, perform the following instructions:
1. In the box with the Assigned state, click and hold the plus button, and draw a line from the box with the
Assigned state to the box with the New state.
2. In the Add Transition dialog box, which opens, click Create to add a new action.
Customizing Workflows with the Diagram View | 62

3. In the New Action dialog box, which opens, specify the following settings:
• Action Name: Reject
• Display Name: Reject
• Category: Actions
4. Click OK to close the dialog box.
5. In the Target State box of the Add Transition dialog box, make sure New is selected.
6. Click OK to close the dialog box.
7. Save your changes.

Notice that the new transition and action have appeared in the diagram.

Step 3: Adding a Transition from the New State to the Assigned State
To add a transition from the New state to the Assigned state, while you are still in the diagram view of the CR304000
(Opportunities) State Diagram: OpportunitiesAssigned page, perform the following instructions:
1. In the box with the New state, click and hold the plus button, and draw a line from the box with the New
state to the box with the Assigned state.
2. In the Add Transition dialog box, which opens, click Create to add a new action.
3. In the New Action dialog box, which opens, specify the following settings:
• Action Name: Assign
• Display Name: Assign
• Category: Actions
4. Click OK to close the dialog box.
5. In the Target State box of the Add Transition dialog box, make sure Assigned is selected.
6. Click OK to close the dialog box.
7. Save your changes.

Notice that the new transition and action have appeared in the diagram.
You have added the new actions and the transitions that these actions trigger.

Diagram View: To Add the Auto-Run Action

The following activity will walk you through the process of creating an auto-run action (that is, an action that the
system performs automatically when a particular condition is met).

Story
Acting as the system administrator, you need to add another transition from the New state to the Assigned state for
the workflow used by the Opportunities (CR304000) form. The transition should be triggered automatically if the
Owner box is not empty.

Process Overview
By using the Workflow (Diagram View) page, you will add a new transition from the New state to the Assigned
state. By using the Conditions page, you will create a condition that checks the Owner box. By using the Workflow
(Diagram View) page, you will also create a hidden action that triggers the transition.
Customizing Workflows with the Diagram View | 63

System Preparation
Before you begin performing the steps of this activity, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have learned how to add actions, as described in Action Configuration: General
Information.
3. Make sure that you have completed the Diagram View: To Add New Actions and Transitions activity.

Step 1: Creating a Condition


In this step, you will add a condition that checks the Owner box. In the Customization Project Editor for the
Opportunities customization project, perform the following instructions:
1. In the navigation pane, click Screens > CR304000 > Conditions. The Conditions: CR304000 (Opportunities)
page opens.
2. On the page toolbar, click Add New Record.
3. In the Condition Properties dialog box, which opens, enter OwnerSpecified as the Condition Name.
4. On the table toolbar, click Add Row, and specify the following settings in the added row:
• Field Name: Owner
• Condition: Is Not Empty
5. Click OK to save your changes and close the dialog box.
The added condition appears in the table with the conditions on the page.

Step 2: Adding a New Transition Between States


To add a transition, in the Customization Project Editor for the Opportunities customization project, perform the
following instructions:
1. In the navigation pane, click Screens > CR304000 > Workflows > OpportunitiesAssigned.
The CR304000 (Opportunities) State Diagram: OpportunitiesAssigned page opens.
2. On the More menu (under Other), click Diagram View to switch to the diagram view of the workflow.
3. In the diagram, in the box with the New state, click and hold the plus button, and draw a line from the box
with the New state to the box with the Assigned state.
4. In the Add Transition dialog box, which opens, click Create to add a new action.
5. In the New Action dialog box, which opens, specify the following settings:
• Action Name: AutoAssign
• Display Name: Auto-Assign
6. Click OK to close the dialog box.
7. In the Target State box of the Add Transition dialog box, make sure Assigned is selected.
8. Click OK to close the dialog box.
9. Save your changes.
Customizing Workflows with the Diagram View | 64

Step 3: Modifying the Created Action


To make the created Auto-Assign action hidden on the Opportunities (CR304000) form of Acumatica ERP and
performed automatically when the Owner box of the form is filled in, perform the following instructions:
1. While you are still the diagram view of the CR304000 (Opportunities) State Diagram: OpportunitiesAssigned
page, click the More button in the box with the New state, and click Edit State on the context menu.
2. On the Actions tab of the State dialog box, which opens, find the row with the AutoAssign action. In the
Auto-Run Action column, select OwnerSpecified.
3. Click OK to close the dialog box.
4. Save your changes to the workflow.
5. In the navigation pane of the Customization Project Editor, click Screens > CR304000 > Actions.
The CR304000 (Opportunities) Actions page opens.
6. In the table, click the AutoAssign link.
7. In the Hidden box of the Action Properties dialog box, which opens, select True.
8. Click OK to save your changes and close the dialog box.

Aer you have performed these instructions and returned to the diagram view of the workflow, the diagram should
look similar to the one in the following diagram. (The results may look slightly different on different devices.)

Figure: The workflow diagram with the added state and transitions

You have created a new action, created a condition, and specified this condition for the created action, so that this
action is performed automatically when the condition is met.

Diagram View: To Add Fields

The following activity will walk you through the process of adding new fields.
Customizing Workflows with the Diagram View | 65

Story
Acting as the system administrator, you need to add a new field to the workflow for the Resolution box of the
Opportunities (CR304000) form and add new combo box values for this field.

Process Overview
By using the Fields page, you will add to your customization project the Resolution field. You will also add new
combo box values for this box on the same page, and specify these values for the Open and New states on the
Workflow (Diagram View) page.

System Preparation
Before you begin performing the steps of this activity, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have learned how to configure fields, as described in Workflow Elements: General
Information.
3. Make sure that you have completed the Diagram View: To Add the Auto-Run Action activity.

Step 1: Adding a New Field


To add the Resolution field and add the new combo box values for it, do the following in the Customization Project
Editor for the Opportunities customization project:
1. In the navigation pane, click Screens > CR304000 > Fields.
The CR304000 (Opportunities) Fields page opens.
2. On the page, notice that the table contains the Status field.
In the Diagram View: To Add a New State activity, you have created a new state (Assigned), which makes the
system add a new value for the Status field.
3. On the page toolbar, click Add New Record.
4. In the Add Field dialog box, which is opened, specify the following settings:
a. Container: Opportunity (Opportunity Summary)
b. DAC: PX.Objects.CR.CROpportunity (Opportunity) (specified automatically)
c. Field Name: Resolution
5. Select the unlabeled check box in the added row.
6. Click Add & Close to save your changes and close the dialog box.
The added field appears in the table on the CR304000 (Opportunities) Fields page.
7. Save your changes.
Customizing Workflows with the Diagram View | 66

Step 2: Adding Combo Box Values


While you are still on the CR304000 (Opportunities) Fields page, add new combo box values for the added field as
follows:
1. In the table, click the row with the added Resolution field.
2. On the page toolbar, click Combo Box Values.
3. In the Combo Box Values dialog box, which opens, click Add Row on the table toolbar, and enter the
following settings in the added row:
• Value: SV
• Description: Service
4. Click Add Row on the table toolbar again, and enter the following settings in the added row:
• Value: DD
• Description: Delivery Date
5. Make sure the Active check box is selected in both of the rows you have added.
6. Click OK to close the dialog box.
7. Save your changes.

Step 3: Specifying the Added Combo Box Values for the System States
Add the new combo box values to the Open and New states as follows:
1. In the navigation pane of the Customization Project Editor, click Screens > CR304000 > Workflows >
OpportunitiesAssigned.
The CR304000 (Opportunities) State Diagram: OpportunitiesAssigned page opens.
2. In the States and Transitions pane, click the Open state.
3. In the Fields table on the State Properties tab, click the row with the Reason field name.
4. On the table toolbar, click Combo Box Values.
5. Select the Active check box in the row with the SV value, and click OK to close the dialog box.
6. In the States and Transitions pane, click the New state.
7. In the Fields table on the State Properties tab, click the row with the Reason field name.
8. On the table toolbar, click Combo Box Values.
9. Select the Active check box in the row with the DD value, and click OK to close the dialog box.
10.Save your changes.

You have created combo box values and specified these values for a box and for the system states.

Diagram View: To Add Dialog Boxes

The following activity will walk you through the process of adding dialog boxes.

Story
To accept an opportunity on the Opportunities (CR304000) form of Acumatica ERP, a salesperson should provide
values in the Resolution and Stage boxes. Acting as the system administrator, you need to add dialog boxes that
prompt users for more information when they click the corresponding commands or buttons to invoke the Accept,
Customizing Workflows with the Diagram View | 67

Reject, and Assign actions. (The additional information may include the reason for rejecting the opportunity or the
owner's name.

Process Overview
By using the Dialog Boxes page,you will create dialog boxes for the Accept, Reject, and Assign actions of the
OpportunitiesAssigned workflow.

System Preparation
Before you begin adding a new state, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure you have learned how to add dialog boxes, as described in Workflow Elements: General
Information.
3. Make sure you have completed the Diagram View: To Add Fields activity.

Step 1: Creating a Dialog Box for the Accept Action


In this step, you will create a dialog box with the Resolution and Stage boxes. Do the following in the
Customization Project Editor for the Opportunities customization project:
1. In the navigation pane, click Screens > CR304000 > Dialog Boxes.
2. On the Dialog Boxes pane of the CR304000 (Opportunities) Dialog Boxes page, which opens, click the plus
button. The system opens a dialog box, New Dialog Box, so that you can specify the name of the dialog box.
3. In the Dialog Box Name box of the dialog box, type FormAccept, and click OK.
4. On the Dialog Boxes pane, click the name of the added dialog box.
5. In the Title box on the right pane, enter Details.
6. In the Dialog Box Fields table, click Add Row on the table toolbar, and specify the following settings in the
added row:
• Schema Field: PX.Objects.CR.CROpportunity.Resolution
This is the name of the field that will correspond to the Reason box on the UI.
• Field Name: Reason
• Title: Reason (specified automatically)
• From Schema: Selected
• Default Value: In Process
• Required: Selected
• Column Span: 1
7. On the table toolbar, click Combo Box Values.
8. In the Combo Box Values dialog box, which opens, select Specify Explicitly in the Source of Values box.
9. In the table, select the check boxes in the Active column for the IP (In Process) and SV (Service) values.
10.Click OK to close the dialog box.
11.In the Dialog Box Fields table, click Add Row on the table toolbar again, and specify the following settings
in the added row:
Customizing Workflows with the Diagram View | 68

• Schema Field: PX.Objects.CR.CROpportunity.StageID


This is the name of the field that will correspond to the Stage box on the UI.
• Field Name: Stage
• Title: Stage (specified automatically)
• From Schema: Cleared
• Default Value: Cleared
• Required: Cleared
• Column Span: 1
12.Save your changes.
13.On the page toolbar, click Preview Dialog Box.
The dialog box should look as shown in the following screenshot.

Figure: The Details dialog box for the Accept action

Step 2: Creating a Dialog Box for the Reject Action


To reject an opportunity on the Opportunities (CR304000) form of Acumatica ERP, a salesperson should provide the
values for the Resolution and Details boxes. To create a dialog box with these boxes, while you are still working on
the CR304000 (Opportunities) Dialog Boxes page, do the following:
1. On the pane toolbar of the Dialog Boxes pane, click the plus button. The system opens a dialog box, New
Dialog Box, so that you can specify the name of the dialog box.
2. In the Dialog Box Name box of the dialog box, type FormReject, and click OK.
3. On the Dialog Boxes pane, click the name of the added dialog box.
4. In the Title box, enter Details.
5. In the Dialog Box Fields table, click Add Row on the table toolbar, and specify the following settings in the
added row:
• Schema Field: PX.Objects.CR.CROpportunity.Resolution
• Field Name: Reason
• Title: Reason (specified automatically)
• From Schema: Selected
• Default Value: Cleared
• Required: Selected
• Column Span: 1
6. On the table toolbar, click Combo Box Values.
7. In the Combo Box Values dialog box, which opens, select Specify Explicitly in the Source of Values box.
8. In the table, select the check boxes in the Active column for the PR (Price) and DD (Delivery Date) values.
9. Click OK to close the dialog box.
Customizing Workflows with the Diagram View | 69

10.In the Dialog Box Fields table, click Add Row on the table toolbar again, and specify the following settings
in the added row:
• Schema Field: PX.Objects.CR.CROpportunity.Details
• Field Name: Details
• Title: Details (specified automatically)
• From Schema: Cleared
• Default Value: Cleared
• Required: Cleared
• Column Span: 1
11.Save your changes.

The dialog box should look as shown in the following screenshot.

Figure: The Details dialog box for the Reject action

Step 3: Creating a Dialog Box for the Assign Action


In this self-guided exercise, you will add a dialog box for the Assign action with the name FormAssign.
You need to add to the dialog box the Owner field of the PX.Objects.CR.CROpportunity.OwnerID schema
field, which is required in the dialog box. That is, when a user clicks the button or command corresponding to the
Assign action, the user will need to select the owner of the opportunity in this dialog box.
The dialog box should look as shown in the following screenshot.

Figure: The Details dialog box for the Assign action

You have created new dialog boxes and added new values to these dialog boxes.

Diagram View: To Modify the Added Actions

The following activity will walk you through the process of modifying the actions you have created in previous
activities.

Story
Acting as the system administrator, you need to modify the actions that you have created for the workflow.
Customizing Workflows with the Diagram View | 70

Process Overview
You will modify the actions that you have created in Diagram View: To Add New Actions and Transitions. In particular,
you will add the dialog boxes you created in Diagram View: To Add Dialog Boxes to the Accept, Reject, and Assign
actions.

System Preparation
Before you begin performing the steps of this activity, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have learned how to add actions, as described in Action Configuration: General
Information.
3. Make sure that you have completed the Diagram View: To Add Dialog Boxes activity.

Step 1: Modifying the Assign Action


You will now modify the Assign action that you have created so that the associated button appears on the
form toolbar of the Opportunities (CR304000) form. In the Customization Project Editor for the Opportunities
customization project, perform the following instructions:
1. In the navigation pane, click Screens > CR304000 > Workflows > OpportunitiesAssigned.
The CR304000 (Opportunities) State Diagram: OpportunitiesAssigned page opens.
2. On the More menu (under Other), click Diagram View to switch to the diagram view of the workflow.
3. In the diagram, click the More button in the box with the New state, and click Edit State on the More menu.
4. On the Actions tab of the State dialog box, which opens, in the row with the Assign action, select the check
box in the Duplicate on Toolbar column.
This will make the button corresponding to the Assign action be displayed on the form toolbar of the
Opportunities (CR304000) form when an opportunity has the New status.
5. Click OK to close the dialog box.
6. Save your changes.
7. In the navigation pane of the Customization Project Editor, click Screens > CR304000 > Actions.
The CR304000 (Opportunities) Actions page opens.
8. In the table, click the Assign link.
9. In the Action Properties dialog box, which opens, select Details(FormAssign) as the Dialog Box.
10.In the Processing Screen box, select CR503120 - Update Opportunities.
11.On the Field Update tab, click Add Row on the table toolbar, and specify the following settings in the added
row:
• Field: Owner
• From Schema: Cleared
• New Value: [FormAssign.Owner]
12.Click OK to save your changes and close the dialog box.
Customizing Workflows with the Diagram View | 71

Step 2: Specifying a Dialog Box for the Accept Action


To specify a dialog box for the Accept action, while you are still on the CR304000 (Opportunities) Actions page,
perform the following instructions:
1. In the table, click the Accept link, which opens the Action Properties dialog box.
2. In this dialog box, select Details(FormAccept) as the Dialog Box.
3. In the Processing Screen box, select CR503120 - Update Opportunities.
4. On the Field Update tab, click Add Row on the table toolbar, and specify the following settings in the added
row:
• Field: Reason
• From Schema: Cleared
• New Value: [FormAccept.Reason]
5. Click Add Row on the table toolbar again, and specify the following settings in the added row:
• Field: Stage
• From Schema: Cleared
• New Value: [FormAccept.Stage]
6. Click OK to save your changes and close the dialog box.

Step 3: Specifying a Dialog Box for the Reject Action


To specify a dialog box for the Reject action, perform the following instructions:
1. In the table on the CR304000 (Opportunities) Actions page, click the Reject link.
2. In the Action Properties dialog box, which opens, select Details(FormReject) as the Dialog Box.
3. In the Processing Screen box, select CR503120 - Update Opportunities.
4. On the Field Update tab, click Add Row on the table toolbar, and specify the following settings in the added
row:
• Field: Reason
• From Schema: Cleared
• New Value: [FormReject.Reason]
5. Click Add Row on the table toolbar again, and specify the following settings in the added row:
• Field: Details
• From Schema: Cleared
• New Value: [FormReject.Details]
6. Click Add Row on the table toolbar again, and specify the following settings in the added row:
• Field: Owner
• From Schema: Cleared
• New Value: =Null
The New Value setting is required to clear the Owner box when the status of an opportunity changes to
New.
7. Click OK to save your changes and close the dialog box.

You have specified added dialog boxes for the actions that you have created in previous examples and specified the
fields that should appear in each dialog box.
Customizing Workflows with the Diagram View | 72

Diagram View: To Remove Unneeded Parts of the Workflow

The following activity will walk you through the process of removing unneeded elements of the workflow.

Story
Acting as the system administrator, you need to remove the transition and the action that are not required in the
workflow of the Opportunities (CR304000) form anymore.

Process Overview
On the Workflow (Diagram View) page, you will remove the predefined direct transition from the New state to the
Open state, because it is no longer required. (In the modified workflow, this transition will not be used.) You will
also remove the Open action, which triggers this transition, from the New state.

System Preparation
Before you begin adding a new state, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have completed the Diagram View: To Modify the Added Actions activity.

Step 1: Removing a Transition


In this step, you will remove the transition from the New state to the Open state. In the Customization Project Editor
for the Opportunities customization project, perform the following instructions:
1. In the navigation pane, click Screens > CR304000 > Workflows > OpportunitiesAssigned.
The CR304000 (Opportunities) State Diagram: OpportunitiesAssigned page opens
2. On the More menu (under Other), click Diagram View to switch to the diagram view of the workflow.
3. In the diagram, click the transition from the New state to the Open state.
4. In the context menu that opens, click Delete.
5. In the dialog box that opens, confirm the action by clicking Delete.
6. Save your changes.
Notice that the box with the New state no longer contains the Open action. The action itself is not removed
from the state; you should remove it manually.

Step 2: Removing an Action


To remove the Open action from the New state, while you are still in the diagram view of the CR304000
(Opportunities) State Diagram: OpportunitiesAssigned page, perform the following instructions:
1. In the diagram, click the More button in the box with the New state, and click Edit State on the More menu.
Customizing Workflows with the Diagram View | 73

2. On the Actions tab of the State dialog box, which opens, clear the check box in the Active column in the row
with the Open action.

You cannot delete the Open action because it is a system action; therefore, you need to
deactivate it.

3. Click OK to close the dialog box.


4. Save your changes.

You have removed unneeded workflow elements.

Diagram View: To Update the System State

The following activity will walk you through the process of updating the system state.

Story
Acting as the system administrator, you need to update a system state in the workflow.

Process Overview
On the Workflow (Diagram View) page, you will update the Open state (which is a predefined state) to make the
Owner box required on the Opportunities (CR304000) form of Acumatica ERP.

System Preparation
Before you begin performing this activity, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have completed the Diagram View: To Remove Unneeded Parts of the Workflow activity.

Step: Updating the Open State


To update the predefined Open system state, in the Customization Project Editor for the Opportunities
customization project, perform the following instructions:
1. In the navigation pane of the Customization Project Editor, click Screens > CR304000 > Workflows >
OpportunitiesAssigned.
The CR304000 (Opportunities) State Diagram: OpportunitiesAssigned page opens.
2. On the More menu (under Other), click Diagram View to switch to the diagram view of the workflow.
3. In the diagram, click the More button in the box with the Open state, and click Edit State on the More menu.
4. On the Fields tab of the State dialog box, which opens, click Add Row on the table toolbar, and specify the
following settings in the added row:
• Object Name: Opportunity (specified automatically)
• Field Name: Owner
Customizing Workflows with the Diagram View | 74

• Required: Selected
5. Click OK to close the dialog box.
6. Save your changes.

You have updated the system state.

Diagram View: To Test the Inherited Workflow

The following activity will walk you through the process of testing the customized workflow that you have created
for the Opportunities (CR304000) form.

Story
Acting as the system administrator, you need to publish your customization project and then test your changes on
the Opportunities (CR304000) form to make sure that the customized workflow works as expected.

Process Overview
By starting on the Customization Projects (SM204505) form of Acumatica ERP, you will go to the Customization
Project Editor for your customization project and publish it. On the Opportunities (CR304000) form, you will then test
the customized workflow.

System Preparation
Before you begin performing the steps of this activity, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have learned how to test a customization, as described in Testing of the Customization:
General Information.
3. Make sure that you have completed the Diagram View: To Update the System State activity.

Step 1: Publishing the Customization Project


Publish your customization project as follows:
1. On the Customization Projects (SM204505) form, click the TaskWorkflow project name to open the
customization project.
2. On the menu of the Customization Project Editor, click Publish > Publish Current Project.
3. Aer the system finishes updating the required data, click Close Compilation Pane.

For details on publishing a customization project, see To Publish a Single Project.

Step 2: Testing the Assigned State and the Accept Action


In Acumatica ERP, test your changes as follows:
1. Open the Opportunities (CR304000) form. If you already have the form open, refresh it.
Customizing Workflows with the Diagram View | 75

2. Create an opportunity with the following settings:


• Business Account: MORNINGCAF
• Subject: Training for Morning Cafe
• Owner: Empty
3. On the form toolbar, click Save.
4. On the form toolbar, make sure that the Assign button is displayed, and click it.
5. In the Details dialog box, which opens, select Kimberly Gibbs in the Owner box.
6. Click OK to save your changes and close the dialog box.
Notice that the status of the opportunity has changed to Assigned, and that the Owner box now contains the
name of the salesperson you have specified.
7. On the More menu (under Actions), click Accept.
8. In the Details dialog box, which opens, select the following settings:
• Reason: In Process
• Stage: Prospect
9. Click OK to save your changes and close the dialog box.
Notice that the status of the opportunity has changed to Open.

Step 3: Testing the Reject Action


Test the Reject action as follows:
1. On the Opportunities (CR304000) form, create another opportunity with the following settings:
• Business Account: BISCCITY
• Subject: Inquiry for berries
• Owner: Andrew Barber
2. Save your changes.
Notice that the status of the opportunity has changed from New to Assigned.
3. On the More menu (under Actions), click Reject.
4. In the Details dialog box, which opens, specify the reason for rejection in the Reason box (Delivery Date) and
any text in the Details box (for example, Delivery has been delayed).
5. Click OK to save your changes and close the dialog box.
Notice that the status of the opportunity has changed to New, and the Owner box has become empty again.

You have tested the changes in your published customization project.


Using Composite States | 76

Using Composite States


In this chapter, you will learn how to use composite states in a workflow. A composite state contains an ordered
sequence of nested states and transitions to and from these states. With these states, common settings for the
nested states are specified in the composite state that includes these states. These settings may include actions,
fields to be updated, and transitions.

Composite States: General Information

This topic provides information about composite states in workflows.

Learning Objectives
In this chapter, you will learn what a composite state is and how to modify it in an inherited workflow.

Applicable Scenarios
You use composite states if you want to specify common settings for a group of states in your workflow.

Composite States in Workflows


A composite state, which can also be referred to as a parent state, is a state that contains an ordered sequence of
nested states and the transitions to and from these states. With composite states, you can specify common settings
(actions, fields to be updated, and transitions) for a group of states only once—in the composite state that includes
these states.
For each of the states inside the composite state, you can do the following:
• Specify whether this state should be skipped by using a skip condition
• Specify a transition to the next state inside the composite state instead of a transition to a specific state
• Specify a transition to the state that is the next one aer the composite state if this composite state is itself a
nested state in another composite state
• Override the settings inherited from the composite state, if needed
These capabilities make workflow customization much easier. You do not need to explicitly specify target states
for transitions. Thus, if you add or remove states in the workflow or change the order of states, you do not need to
modify all the affected transitions.
A record created on a form cannot be in a composite state; it can only be in one of its nested states. When a record
enters any nested state in a composite state, the system checks the skip condition specified for this state, if one has
been defined. If the condition is fulfilled, the system does the following for the current state:
1. Assigns the default values for the fields as specified on the State Properties tab of the Workflow (Tree View)
page for the form if the current state is the initial state of the workflow
2. Does not check the fields that should be updated when the record enters the state and leaves it
3. Does not check any of the workflow settings, and moves the record to the next state inside the composite
state

If no skip condition is specified, the system uses the typical workflow for this state. This means that the transitions
are triggered only by actions or event handlers, and the system does not check the skip condition again while the
record remains in this state.
Using Composite States | 77

To add a composite state, you first add a new or a predefined state, and then specify a parent state for it in the
Change Parent State dialog box.
The screenshot below shows the default workflow of the Invoices (SO303000) form on the Workflow (Tree View)
page of the Customization Project Editor. The composite state (see Item 1 in the screenshot) contains nested states
(Item 2) that are part of a typical invoice workflow, as well as transitions (Item 3) to and from the composite state
and the nested states. Notice that the Balanced nested state also contains transitions (Item 4).

Figure: A composite state in the invoice workflow

For a workflow with composite states, the diagram view of the page is not available, and the Diagram
View button is not displayed on the More menu of the Workflow (Tree View) page.

Composite States: To Modify a Workflow with a Composite State

The following activity will walk you through the process of modifying a composite state in the invoice workflow.

This activity is based on the U100 dataset. If you are using another dataset, or if any system settings
have been changed in U100, these changes can affect the workflow of the activity and the results of
the processing. To avoid any issues, restore the U100 dataset to its initial state.

Story
On the Invoices (SO303000) form, the default workflow includes a composite state with multiple nested states.
Suppose that you want to add a new state, Postponed, to the composite state in the workflow for the Invoices form
aer the Credit Hold state. Further suppose that you need to specify a skip condition for it and add a transition from
this state to the next state in the workflow.
If a user specifies a discount for an invoice, you want this invoice to be reviewed and the discount to be approved
before the user can proceed with processing the invoice. Aer the discount is approved, the system specifies the
current date in the Cash Discount Date box. The skip condition will check for no cash discount being applied to the
invoice. That is, if the user does not specify any discount, the system will skip the Postponed state.
Using Composite States | 78

Process Overview
By using the Workflows page, you will create an inherited workflow for the Invoices (SO303000) form. By using the
Workflow (Tree View) page, you will add a nested state to the workflow. On the Conditions page, you will specify a
condition that the system will use to skip this state. You will then add a transition from the state to the next nested
state on the Workflows page.

System Preparation
Before you begin performing the steps of this activity, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure you have learned how to perform workflow customization, as described in Inherited Workflows:
General Information.
3. On the Customization Projects (SM204505) form, create a customization project named Invoices.

Step 1: Adding a Form to the List of Customized Screens


Add the Invoices (SO303000) form to the list of customized screens as follows:
1. In Acumatica ERP, open the Customization Projects (SM204505) form.
2. In the table with the customization projects, click the Invoices link.
The Customization Project Editor opens for the Invoices customization project. You will use this project for
the customization.
3. In the navigation pane of the Customization Project Editor, click Screens.
4. On the page toolbar of the Customized Screens page, which is opened, click Customize Existing Screen.
5. In the Customize Existing Screen dialog box, which is opened, select Invoices (SO303000).
6. Click OK to close the dialog box.
The SO303000 (Invoices) Workflows page of the Customization Project Editor opens. Notice that the table on
the page contains one workflow: Default Workflow.

Step 2: Creating an Inherited Workflow for the Form


Create a customized workflow for the Invoices (SO303000) form as follows:
1. On the page toolbar of the SO303000 (Invoices) Workflows page, which you opened in the previous step,
click Add Workflow.
2. In the Add Workflow dialog box, which opens, specify the following settings:
• Operation: Extend System Workflow
• Base Workflow: Default Workflow
• Workflow Type: DEFAULT
• Workflow Name: Invoices (the name of the workflow that will be displayed on the Workflow page)
3. Click OK to close the dialog box.
Using Composite States | 79

A row for the workflow appears in the table on the Workflows page. Notice that the workflow’s status is
Inherited, which means that this workflow is based on a predefined workflow.
4. Select the Active check box for the created workflow.
Notice that the Active check box has been cleared automatically for the predefined workflow (Default
Workflow). This means that the system will not use this workflow for the form anymore.
5. On the page toolbar, click Save.
6. In the table, click the link in the Workflow Name column for the created workflow.
The SO303000 (Invoices) State Diagram: Invoices page opens.

Step 3: Adding a Condition


To add a skip condition that the system will use to skip the Postponed state, perform the following instructions:
1. In the navigation pane, click Screens > SO30300 > Conditions.
The Conditions: SO303000 (Invoices) page opens.
2. On the page toolbar, click Add New Record.
3. In the Conditions Properties dialog box, which opens, type DiscountEmpty as the condition name.
4. On the table toolbar, add a row with the following settings:
• Field Name: Discount Total
• Condition: Equals
• From Schema: Selected
• Value: 0
5. Make sure the Active check box is selected for the added rows.
6. Click OK to save your changes and close the dialog box.
The added condition appears in the list of conditions on the Conditions: SO303000 (Invoices) page.

Step 4: Adding a Nested State


To add a new nested state to the composite state, perform the following instructions:
1. In the navigation pane, click Screens > SO303000 > Workflows > Invoices.
The SO303000 (Invoices) State Diagram: Invoices page opens.
2. On the More menu (under Actions), click Add State.
3. In the Add State dialog box, which opens, specify the following settings:
• Identifier: Y
• Description: Postponed
• Parent State: H->B
4. Click OK to close the dialog box.
In the States and Transitions pane, the system adds the Postponed state aer the last nested state
(Balanced in this case).
5. With Postponed selected in the pane, use the arrows on the pane toolbar to move the added state aer the
Credit Hold state.
6. With the Postponed state still selected, select DiscountEmpty in the Skip Condition box of the State
Properties tab.
Using Composite States | 80

If the condition is fulfilled (that is, if the value in the Cash Discount box is 0) and a document is ready to
enter the Postponed state, it then skips this state and automatically moves to the next state (Pending Print in
this case).
7. Save your changes.

Step 5: Adding a Transition


To add a transition from the added state to the next nested state of the composite state, perform the following
instructions:
1. While you are still on the SO303000 (Invoices) State Diagram: Invoices page, click the Postponed state.
2. On the More menu (under Actions), click Add Transition.
3. In the Add Transition dialog box, which is opened, click Create to the right of the Trigger Name box.
4. In the New Action dialog box, which is opened, specify the following settings for the action:
• Action Name: DiscountApproved
• Display Name: Discount Approved
• Category: Processing
5. Click OK to close the New Action dialog box.
6. In the Target State box of the Add Transition dialog box, select @Next.
This setting indicates that the transition will lead to the next state in the sequence (Pending Print in this
case).
7. Click OK to close the dialog box.
The system adds the transition to the Transitions node of the Postponed state.
8. In the States and Transitions pane, click the Postponed state.
9. On the table toolbar of the Fields to Update on Exit tab (in the lower part of the State Properties tab) for
this state, click Add Row and specify the following settings:
• Active: Selected
• Field Name: Cash Discount Date
• From Schema: Cleared
• New Value: =Now()
Each time a document leaves the Postponed state, the value of the Cash Discount Date field changes to the
current date. This happens when the document moves to another state because the transition has been
triggered by the Discount Approved action.
10.Save your changes.

Step 6: Publishing the Customization Project


Publish the customization project as follows:
1. On the menu of the Customization Project Editor, click Publish > Publish Current Project.
2. Aer the system finishes updating the required data, click Close Compilation Pane.

Step 7: Testing the Your Changes


Test your changes as follows:
1. In Acumatica ERP, go to the Invoices (SO303000) form. You need to refresh the form if you were already
viewing it before the publication of the project.
Using Composite States | 81

2. Create a new invoice for the customer with the CITRUS ID.
3. On the tab toolbar of the Details tab, click Add Row, and specify the following settings in the added row:
• Branch: HEADOFFICE (specified automatically)
• Inventory ID: KIWIJAM96
• Transaction Descr.: Kiwi jam 96 oz (specified automatically)
• Warehouse: Retail
• Location: JS1
• Quantity: 20
4. On the form toolbar, click Save.
5. In the Discount Total box of the Summary area of the form, enter 5.
6. On the More menu (under Processing), click Remove Hold.
The status of the invoice changes to Postponed. On the More menu, notice that only one command is
available (Discount Approved).
7. Click Discount Approved.
The status of the invoice changes to Balanced, and the value in the Cash Discount Date box is the current
date.
8. Create another invoice for the customer with the GROCERIEX ID.
9. On the tab toolbar of the Details tab, click Add Row, and specify the following settings in the added row:
• Branch: HEADOFFICE (specified automatically)
• Inventory ID: APPLES
• Transaction Descr.: Fresh apples 1 lb (specified automatically)
• Location: Main
• Quantity: 7
10.On the form toolbar, click Save.
11.On the More menu (under Processing), click Remove Hold.
The status of the invoice changes to Balanced. Because you have not specified any value in the Discount
Total box, the system skipped the Postponed state and moved the invoice to the next state in the composite
state (Balanced in this case).
Customizing Workflows with a Workflow-Identifying Field | 82

Customizing Workflows with a Workflow-Identifying Field


In this chapter, you will learn how to customize workflows with a workflow-identifying field. The value of a
workflow-identifying field determines which workflow will be used for the form. Thus, a record created on the form
is processed differently based on the value of this field.

Workflow-Identifying Fields: General Information

You can add multiple workflows for a particular form. In this case, each workflow is applied to all records that
have a specific value in a particular field. This field is described as a workflow-identifying field because its value
determines the workflow to be used.
For example, for sales orders on the Sales Orders (SO301000) form, one workflow can be applied to sales orders of
a particular order type, such as SO, and another workflow can be applied to sales quotes, which have the QT order
type.

Learning Objectives
In this chapter, you will gain experience creating a workflow that is based on the specific value of a selected field.
You will perform modifications of the sales order workflow, which is a workflow with a workflow-identifying field.

Applicable Scenarios
You customize a workflow with a workflow-identifying field if you need to make changes to the workflow so that it
is better suited for your business processes, and you do not want to create such a workflow from scratch.

Workflow Types
A workflow type is a setting on the Workflows page that determines the applicable entities to which the workflow is
applied. The applicable entities depend on the particular form for which the workflow is defined. For example, on
the Leads (CR301000) form, leads are the only applicable entities, so one workflow for all leads would be sufficient.
On the Sales Orders (SO301000) form, the applicable entities include sales orders, invoices, and credit memos, so a
separate workflow type should be used for each of these entities.
The table of the Workflows page has the Workflow Type column. The table of this page contains one row for each
workflow, and the row shows the workflow used for entities of the type. Thus, for a workflow without a workflow-
identifying field, there is only one row. If the workflow has a workflow-identifying field, the table has multiple rows,
with the workflow type determining the entities that use the workflow.
To apply a custom workflow to all entities, regardless of their settings, you set the workflow type to DEFAULT.
To apply different workflows to entities with different values in a particular field, you specify the Workflow-
Identifying Field on the Workflows page for the form. Then for each workflow you want to add, you click Add
Workflow on the page toolbar; in the Add Workflow dialog box, which opens, you need to specify a workflow type
other than DEFAULT. For example, for the Opportunities (CR304000) form, to apply a workflow to the entities of a
specific opportunity class, on the Workflows page, you select Class ID in the Workflow-Identifying Field box of the
Summary area and click Add Workflow on the More menu. Then in the Add Workflow dialog box, you select a type
other than DEFAULT.
If you select the Allow Users to Modify Value check box, a user can modify the element that corresponds to the
field. If this check box is cleared, the element is unavailable for selection. With the check box selected, if a user
changes the value of the field that defines the workflow type for a record on a particular form, the system does the
following:
Customizing Workflows with a Workflow-Identifying Field | 83

• If the current state of the record does not exist in the new workflow, the system transitions the record to the
initial state of the new workflow that corresponds to the field value. The new workflow is then used for the
entity.
• If the current state of the record exists in the new workflow, the record remains in this state, and the new
workflow is used for the record.

Overview of the Workflow for the Sales Orders Form


As you perform the activities of this chapter, you will implement the following changes to the workflow of sales
orders on the Sales Orders (SO301000) form:
• The system will release a new sales order from hold automatically if the Order Total is less than $800.
• The system will put a sales order with any status on hold if the Order Total is greater than or equal to $800.
• If a sales order has been manually removed from hold once, it should not be possible to put this sales order
on hold again, even if its Order Total has been increased.

Workflow-Identifying Fields: To Create an Inherited Workflow

The following activity will walk you through the process of creating an inherited workflow for the Sales Orders
(SO301000) form based on a predefined one. You will modify this workflow in other activities of this chapter to fit
the company's preferred workflow for sales orders.

This activity is based on the U100 dataset. If you are using another dataset, or if any system settings
have been changed in U100, these changes can affect the workflow of the activity and the results of
the processing. To avoid any issues, restore the U100 dataset to its initial state.

Story
Acting as the system administrator, you need to create a customized workflow for the Sales Orders (SO301000)
form. This workflow will use the field as the workflow-identifying field. The type of the workflow will be .

Process Overview
By using the Customized Screens page, you will add the Sales Orders (SO301000) form to the list of customized
screens. You will then create a customized workflow for it based on a predefined one by using the Workflows page.

System Preparation
Before you begin performing the steps of this activity, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Unpublish your current customization project or projects by doing the following:


a. Open the Customization Projects (SM204505) form.
b. On the More menu (under Publish), click Unpublish All.
3. On the Customization Projects form, create a customization project named SalesOrdersCheckHold.
Customizing Workflows with a Workflow-Identifying Field | 84

4. Open the Order Types (SO201000) form, and do the following:


a. Select the SO order type.
b. On the General tab, make sure that the Hold Orders on Entry box is selected.

Step 1: Adding a Screen to the List of Customized Screens


You will add the screen corresponding to the Sales Orders (SO301000) form to the list of customized screens as
follows:
1. Open the Sales Orders form, and on the form title bar, click Customization > Show State Diagram.
2. In the State Diagram dialog box, which opens, click Customize Workflow.
3. In the Select Customization Project dialog box, which opens, select the SalesOrdersCheckHold
customization project.
4. Click OK to close the dialog box.
The SO301000 (Sales Orders) Workflows page of the Customization Project Editor opens. Notice that the
table on the page contains multiple predefined workflows. The system has also added the screen to this
page.

Step 2: Creating an Inherited Workflow for the Form


Create an inherited workflow for the Sales Orders (SO301000) form as follows:
1. While you are still on the SO301000 (Sales Orders) Workflows page, notice that the option in the Workflow-
Identifying Field box is Behavior.
This box is unavailable because the Sales Orders form contains active workflows that use the option in this
box as the workflow type.
2. On the More menu (under Actions), click Add Workflow.
3. In the Add Workflow dialog box, which opens, specify the following settings:
• Operation: Extend System Workflow
• Base Workflow: SO Workflow
• Workflow Type: SO
• Workflow Name: Sales Order
4. Click OK to close the dialog box.
A row for the workflow appears in the table on the Workflows page. Notice that the workflow status is
Inherited, and that in the Base System Workflow column, SO Workflow is specified for it.
5. Select the Active check box in the row of the workflow you created.
Notice that when you selected the Active check box, this check box was automatically cleared in the row of
the predefined workflow (SO Workflow).
6. On the page toolbar, click Save.
7. In the table, click the link in the Workflow Name column for the created workflow.
The SO301000 (Sales Orders) State Diagram: Sales Order page opens.

You have added a form to the list of customized screens and created a custom workflow for it.
Customizing Workflows with a Workflow-Identifying Field | 85

Workflow-Identifying Fields: To Add User-Defined Fields

The following activity will walk you through the process of adding user-defined fields and the attributes that
correspond to them.
User-defined fields are fields an organization can add directly to the Acumatica ERP data entry forms. The fields
will be displayed on the User-Defined Fields tab and can be used to gather information that is important to the
organization but does not already appear on the form. These fields are based on predefined and site-specific
attributes defined in the system.

Story
Acting as the system administrator, you need to create user-defined fields for the workflow of sales orders with the
SO type: one to check if a sales order has been put on hold manually, and another to check whether it has already
been removed from hold.

Process Overview
To make the added attributes available on the Sales Orders (SO301000) form as boxes, you will add user-defined
fields for these attributes on the Edit User Defined Fields (CS205020) form. You will then use these fields in the
conditions of the customized workflow. (You will create the conditions in the next activity.)

System Preparation
Before you begin performing the steps of this activity, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have completed the Workflow-Identifying Fields: To Create an Inherited Workflow activity.

Step 1: Creating Attributes


In this step, you will create the attributes that will correspond to the user-defined fields. In Acumatica ERP, perform
the following instructions:
1. On the Attributes (CS205000) form, create an attribute with the following settings:
• Attribute ID: SOONHOLD
• Description: SO On Hold
• Control Type: Checkbox
You will use this attribute to check whether a sales order has been put on hold manually, and to keep the
sales order on hold if its Order Total is less than $800.
2. On the form toolbar, click Save.
3. Add another attribute with the following settings:
• Attribute ID: SOREVIEW
• Description: SO Reviewed
• Control Type: Checkbox
Customizing Workflows with a Workflow-Identifying Field | 86

You will use this attribute to check whether a sales order was manually removed from hold previously.
4. On the form toolbar, click Save.

Step 2: Adding User-Defined Fields to a Form


In this step, you will add to the Sales Orders (SO301000) form the user-defined fields that correspond to the
attributes. In Acumatica ERP, perform the following instructions:
1. On the Sales Orders (SO301000) form, click Customization > Manage User-Defined Fields.
2. On the Edit User Defined Fields (CS205020) form, which opens, add user-defined fields for the created
attributes as follows:
a. On the form toolbar, click Add User-Defined Field.
b. In the Attribute ID box of the User-Defined Field Parameters dialog box, which is opened, select
SOONHOLD.
c. Click OK to save your changes and close the dialog box.
d. On the form toolbar, click Add User-Defined Field again.
e. In the Attribute ID box of the User-Defined Field Parameters dialog box, select SOREVIEW.
f. Click OK to save your changes and close the dialog box.
3. Click the back arrow to save the added fieldsand return to the Sales Orders form.

For details on user-defined fields, see Managing Attributes and User-Defined Fields.

For specified types of sales orders, you can control whether each added user-defined field is disabled,
whether it is required, and whether it is hidden. To do so, you use the Properties tab of the Edit User
Defined Fields (CS205020) form. On the tab, you select the needed sales order type in the Order Type
box. In the table with the user-defined fields, you can then select any of the following check boxes for
each field: Required, Hidden, and Disabled.

Step 3 (Optional): Adding the User-Defined Fields to the Customization Project


As an optional step, you can add the user-defined fields you have created to your customization project. In this
case, it will be possible to export the customization project and then import and publish it on another instance
without the need to create user-defined fields on this instance manually. Do the following:
1. For the SalesOrdersCheckHold customization project, in which you have created a customized workflow in
Workflow-Identifying Fields: To Create an Inherited Workflow, open the Customization Project Editor.
2. In the navigation pane, click User-Defined Fields.
The User-Defined Fields page opens.
3. On the page toolbar, click Add New Record.
4. In the Add User-Defined Fields dialog box, which is opened, select the unlabeled check boxes in the rows
with the SOONHOLD and SOREVIEW attribute IDs.
5. Click Save to close the dialog box and save your changes.
The selected user-defined fields have been added to the customization project.

You have created attributes and added user-defined fields for these attributes. You have also added these user-
defined fields to the customization project.
Customizing Workflows with a Workflow-Identifying Field | 87

Workflow-Identifying Fields: To Add Conditions

The following activity will walk you through the process of creating conditions.

Story
Acting as the system administrator, you need to add the following conditions to the workflow:
• The TotalMoreThan800 condition, which will be used to automatically put a sales order on hold if its Order
Total is greater than $800 and the sales order has not been yet reviewed
• The TotalLessThan800 condition will be used to automatically remove a sales order from hold if its Order
Total is less than $800 and it has not been put on hold manually

Process Overview
By using the Conditions page, you will add the conditions that you will use later to modify system actions.

System Preparation
Before you begin adding a new state, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have learned how to configure conditions, as described in Conditions and Transitions:
General Information.
3. Make sure that you have completed the Workflow-Identifying Fields: To Add User-Defined Fields activity.

Step: Adding Conditions


In this step, you will add conditions to be used for SO sales orders in the SalesOrdersCheckHold customization
project. In the Customization Project Editor for this customization project, perform the following instructions:
1. In the navigation pane, click Screens > SO30100 > Conditions.
The Conditions: SO30100 (Sales Orders) page opens.
2. On the page toolbar, click Add New Record.
3. In the Conditions Properties dialog box, which opens, type TotalMoreThan800 as the condition name.
4. Add two rows with the following settings.

Field Name Condition From Schema Value Operator

OrderTotal Is Greater Than or Equal To Selected 800 And

SO Reviewed Equals Selected Empty And

5. Make sure the Active check box is selected for the added rows.
Customizing Workflows with a Workflow-Identifying Field | 88

6. Click OK to save your changes and close the dialog box.


The added condition appears in the list of conditions on the Conditions: SO30100 (Sales Orders) page.
7. By using instructions that are similar to Instructions 2 through 6, add the TotalLessThan800 condition
to check whether the Order Total is less than $800. Specify the following settings in the rows of the
Conditions Properties for this condition.

Field Name Condition From Schema Value Operator

OrderTotal Is Less Than Selected 800 And

SO On Hold Equals Selected Empty And

The condition should look as shown in the following screenshot.

Figure: The TotalLessThan800 condition

Workflow-Identifying Fields: To Add Fields

The following activity will walk you through the process of adding the user-defined fields you have created to the
workflow.

Story
Acting as the system administrator, you need to do the following:
• Add the user-defined fields you have created in Workflow-Identifying Fields: To Add User-Defined Fields to the
workflow in the Customization Project Editor, and define them as hidden in the field properties.
• Make the fields hidden on the Sales Orders (SO301000) form because these fields represent internal flags
that should not be displayed to users.
Customizing Workflows with a Workflow-Identifying Field | 89

Process Overview
By using the Fields page, you will add the created fields to the SalesOrdersCheckHold workflow.

System Preparation
Before you begin performing the step of this activity, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have learned how to configure fields, as described in Workflow Elements: General
Information.
3. Make sure that you have completed the Workflow-Identifying Fields: To Add Conditions activity.

Step: Adding User-Defined Fields


To add the user-defined fields to the workflow, in the Customization Project Editor for the SalesOrdersCheckHold
customization project, perform the following instructions:
1. In the navigation pane, click Screens > SO30100 > Fields.
The SO30100 (Sales Orders) Fields page opens.
2. On the page toolbar, click Add New Record.
3. In the Add Field dialog box, which opens, specify the following settings:
• Container: Document (Order Summary)
• DAC: PX.Objects.SO.SOOrder (Sales Order) (specified automatically)
• Field Name: AttributeSOONHOLD
4. Select the unlabeled check box in the added row.
5. Click Add & Close to save your changes and close the dialog box.
The added field appears in the table on the SO30100 (Sales Orders) Fields page.
6. Click Add New Record on the page toolbar again, and specify the following settings:
• Container: Document (Order Summary)
• DAC: PX.Objects.SO.SOOrder (Sales Order) (specified automatically)
• Field Name: AttributeSOREVIEW
7. Select the unlabeled check box in the added row.
8. Click Add & Close to save your changes and close the dialog box.
9. In the row with the AttributeSOONHOLD and AttributeSOREVIEW fields, select True in the Hidden column.

As an alternative to defining these fields as hidden in the field properties, you can select the
Hidden check box for these user-defined fields on the Edit User Defined Fields (CS205020)
form.

10.Save your changes.


Customizing Workflows with a Workflow-Identifying Field | 90

The SO30100 (Sales Orders) Fields page with the added fields should look as shown in the following
screenshot.

Figure: The SO30100 (Sales Orders) Fields page

You have added the user-defined fields to the workflow and specified them as hidden.

Workflow-Identifying Fields: To Add a New Action and a Transition

The following activity will walk you through the process of adding a new action and a transition to the workflow.

Story
In the predefined sales order workflow, when a user clicks Remove Hold on the form toolbar or on the More menu
(under Processing) of the Sales Orders (SO301000) form, the Remove Hold action triggers the transition from the
On Hold state to one of the following states: Open, Pending Processing, or Awaiting Payment.
In the customized workflow, you need to add new transitions from the On Hold state to each of these states.
The added transitions should be performed if the Order Total is less than $800—that is, a sales order should be
automatically removed from hold only if this condition is met. With these changes implemented, a sales order on
the Sales Orders form will remain on hold only if its Order Total is greater than $800 or if a user puts it on hold
manually; in all other cases, the sales order will be removed from hold automatically.

Process Overview
By using the Workflow (Diagram View) page, you will create a transition from the On Hold state to the Open state. To
do so, on the same page, you will create a new action that triggers this transition, and specify the conditions for it.

System Preparation
Before you begin performing the steps of this activity, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have learned how to add actions and transitions, as described in Action Configuration:
General Information and Conditions and Transitions: General Information.
3. Make sure that you have completed the Workflow-Identifying Fields: To Add Fields activity.
Customizing Workflows with a Workflow-Identifying Field | 91

Step 1: Adding a Transition Between States


You will create a transition from the On Hold state to the Open state. In the Customization Project Editor for the
SalesOrdersCheckHold customization project, perform the following instructions:
1. In the navigation pane, click Screens > SO301000 > Workflows > Sales Order.
The SO301000 (Sales Orders) State Diagram: Sales Order page opens.
2. On the More menu (under Other), click Diagram View.
3. In the box with the On Hold state, click and hold the plus button, and draw a line from the box with the On
Hold state to the box with the Open state.
4. In the Add Transition dialog box, which opens, click Create to the right of the Trigger Name box to add a
new action.
5. In the New Action dialog box, which opens, specify the following settings:
• Action Name: removeHoldTotalLess
• Display Name: Total Less Than 800
6. Click OK to close the dialog box.
7. In the Target State box of the Add Transition dialog box, make sure that Open is selected, and click OK,
which closes the dialog box.
Notice that a label with the Total Less Than 800 action name has appeared in the box with the On Hold state.
Also, an arrow, which represents the transition from the On Hold state to the Open state, has appeared in the
diagram.
8. Save your changes.

Instead of using the existing Remove Hold action, you have added the Total Less Than 800 action to distinguish
between the following two cases:
• A sales order has been reviewed and removed from hold manually.
In this case, the system selects the SO Reviewed flag (which corresponds to the SO Reviewed check box on
the Sales Orders (SO301000) form) for the sales order.
• A sales order has been removed from hold automatically because its Order Total is less than $800, and it
has never been put on hold manually.
The system does not select the SO Reviewed flag (the SO Reviewed check box on the Sales Orders
(SO301000) form) in this case; instead, it performs the added Total Less Than 800 action.
You added the Total Less Than 800 action because when the system performs the existing Remove Hold action, you
want it to select the SO Reviewed flag so that it does not put a sales order on hold again. (This is the first case from
the list above.) When the status of a sales order changes to Open automatically (which is the second case from the
list), you want the system to leave this flag clear.

Step 2: Modifying the Added Transition


To modify the transition from the On Hold state to the Open state, while you are still working with the diagram view
of the SO301000 (Sales Orders) State Diagram: Sales Order page in the Customization Project Editor, perform the
following instructions:
1. Click the added transition, and on the context menu that is displayed, click the Edit button.
The Transition dialog box opens.
2. In the Fields to Update Aer Transition table of the dialog box, click Add Row on the table toolbar, and
specify the following settings in the added row:
• Field Name: InclCustOpenOrders
Customizing Workflows with a Workflow-Identifying Field | 92

• From Schema: Selected


• New Value: Selected
3. Click OK to close the dialog box.
4. Save your changes.

The added InclCustOpenOrders setting in the transition properties indicates that the total of a sales order should be
reflected in the customer's balance.

Step 3: Modifying the Settings of the Action


Because the Total Less Than 800 action should remove a sales order from hold, the Hold field should be set to False
when this action is performed. Also, this action should not be visible to users, because it is an auxiliary action that
the system uses to automatically remove the sales order from hold on the Sales Orders (SO301000) form if it has
an Order Total of less than $800 and it has not been put on hold manually. To modify these settings, perform the
following instructions:
1. In the navigation pane of the Customization Project Editor, click Screens > SO301000 > Actions.
The SO301000 (Sales Orders) Actions page opens.
2. In the table, click the removeHoldTotalLess link.
3. In the Action Properties dialog box, which opens, do the following:
a. In the Hidden box, select True.
b. On the Field Update tab, click Add Row on the table toolbar, and specify the following settings in the
added row:
• Active: Selected
• Field: Hold
• From Schema: Selected
• New Value: Cleared
The settings should look as shown in the following screenshot.

Figure: The Action Properties dialog box


Customizing Workflows with a Workflow-Identifying Field | 93

4. Click OK to close the dialog box.

Step 4: Adding a Condition for the Action


You need to add a condition for the Total Less Than 800 action so that this action is performed automatically. With
this action, a sales order should not remain on hold if its Order Total is less than $800 and it has not been put on
hold manually.
To add a condition for the Total Less Than 800 action, perform the following instructions:
1. In the navigation pane of the Customization Project Editor, click Screens > SO301000 > Workflows > Sales
Order.
The SO301000 (Sales Orders) State Diagram: Sales Order page opens.
2. On the More menu (under Other), click Diagram View.
3. Click the More button in the box with the On Hold state, and click Edit State on the context menu.
The State dialog box opens.
4. On the Actions tab of the dialog box, click the row with the Total Less Than 800 action, and select
TotalLessThan800 in the Auto-Run Action column.
5. Click OK to close the dialog box.
6. Save your changes.

Notice that the added transition from the On Hold state to the Open state now has a lightning rod displayed above
it, which indicates that the action that triggers this transition contains an auto-run condition.
You have added an action and a transition to the workflow. You have also modified the settings of the added
elements.

Workflow-Identifying Fields: To Add New Transitions

The following activity will walk you through the process of adding new transitions to the workflow.

Story
In Workflow-Identifying Fields: To Add a New Action and a Transition, you have created the Total Less Than 800 action
for the On Hold state. Now you can use this action to add transitions from this state to the Pending Processing state
and the Awaiting Payment state. These transitions should have the same properties as the respective transitions
triggered by the predefined Remove Hold action. Thus, you will add these transitions by duplicating the respective
transitions triggered by this predefined action.
Once you implement these changes, if a sales order is removed from hold automatically, it moves to the same state
(depending on which conditions are fulfilled) that it would move to if it had been removed from hold manually.

Process Overview
By using the Workflow (Diagram View) page, you will add transitions from the On Hold state to the Pending
Processing state and to the Awaiting Payment state.

System Preparation
Before you begin performing the steps of this activity, do the following:
Customizing Workflows with a Workflow-Identifying Field | 94

1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have learned how to configure transitions, as described in Conditions and Transitions:
General Information.
3. Make sure that you have completed the Workflow-Identifying Fields: To Add a New Action and a Transition
activity.

Step 1: Adding a Transition from the On Hold State to the Pending Processing State
In this step, you add a new transition from the On Hold state to the Pending Processing state; this transition will
be triggered by the Total Less Than 800 action. In the diagram view of the SO301000 (Sales Orders) State Diagram:
Sales Order page of the Customization Project Editor, perform the following instructions:
1. In the box with the On Hold state, click and hold the label with the Total Less Than 800 action, and draw a
line from the box with the On Hold state to the box with Pending Processing state.
2. Click the added transition, and on the context menu, click the Edit button.
The Transition dialog box opens.
3. In the Condition box, select HasPaymentsInPendingProcessing.
This is the same condition that is specified for the transition triggered by the Remove Hold action.
The transition should look as shown in the following screenshot.

Figure: The transition from the On Hold state to the Pending Processing state

4. Click OK to close the dialog box.


5. Save your changes.
Customizing Workflows with a Workflow-Identifying Field | 95

Step 2: Adding a Transition from the On Hold State to the Awaiting Payment State
To add a transition from the On Hold state to the Awaiting Payment state, while you are still working with the
diagram view of the SO301000 (Sales Orders) State Diagram: Sales Order page of the Customization Project Editor,
perform the following instructions:
1. In the box with the On Hold state, click and hold the label with the Total Less Than 800 action, and draw a
line to the box with Awaiting Payment state.
2. Click the added transition, and on the context menu, click the Edit button.
The Transition dialog box opens.
3. In the Condition box, select IsPaymentRequirementsViolated.
4. Click OK to close the dialog box.
5. Save your changes.

Notice that each of the added transitions has a lightning rod displayed above them, which indicates that the
actions with these transitions are triggered automatically when the condition is met.
You have added new actions and the transitions that these actions trigger. You have also modified one of the added
actions.

Workflow-Identifying Fields: To Modify System Actions

The following activity will walk you through the process of modifying system actions.

Story
Acting as the system administrator, you need to modify the putOnHold system action, which triggers transitions
from the following states:
• Credit Hold
• Pending Processing
• Awaiting Payment
• Open
• Back Order
You also need to modify the removeHold system action for some of the states.
With the changes implemented, a sales order will be put on hold automatically from any of these states if its Order
Total on the Sales Orders (SO301000) form is greater than or equal to $800 and it has not been removed from hold
manually.

Process Overview
By using the Workflow (Diagram View) page, you will modify the Hold action for multiple states of the workflow. You
will also modify the Remove Hold action by using the Actions page.

System Preparation
Before you begin performing the steps of this activity, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.
Customizing Workflows with a Workflow-Identifying Field | 96

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have learned how to modify actions, as described in Action Configuration: General
Information.
3. Make sure that you have completed the Workflow-Identifying Fields: To Add New Transitions activity.

Step 1: Modifying the Hold Action for the Credit Hold State
To add a condition for the Hold action in the Credit Hold state, in the diagram view of the SO301000 (Sales Orders)
State Diagram: Sales Order page of the Customization Project Editor, perform the following instructions:
1. In the box with the Credit Hold state, click the More button, and click Edit State on the More menu.
The State dialog box opens.
2. On the Actions tab of the dialog box, click the row with the Hold (putOnHold) action, and select
TotalMoreThan800 in the Auto-Run Action column.
This setting will make the system perform this action automatically—that is, change the state of a sales
order to On Hold—if the TotalMoreThan800 condition is met.
3. Click OK to close the dialog box.
4. Save your changes.

Step 2: Modifying the Hold Action for Other States


To add a condition for the Hold action in the Pending Processing state, while you are still in the diagram view of
the SO301000 (Sales Orders) State Diagram: Sales Order page of the Customization Project Editor, perform the
following instructions:
1. In the box with the Pending Processing state, click the More button, and click Edit State on the More menu.
The State dialog box opens.
2. On the Actions tab of the dialog box, click the row with the Hold (putOnHold) action, and select
TotalMoreThan800 in the Auto-Run Action column.
This setting will make the system perform this action automatically—that is, change the state of the sales
order to On Hold—if the TotalMoreThan800 condition is met.
3. Click OK to close the dialog box.
4. Save your changes.
5. By using instructions that are similar to the previous ones, add the TotalMoreThan800 condition for the
Hold action in the Awaiting Payment, Open, and Back Order states. Aer you add each condition, save your
changes.

Step 3: Modifying the Remove Hold Action


You need to modify the Remove Hold system action so that the system selects the SO Reviewed flag for a sales order
if the sales order on the Sales Orders (SO301000) form has been removed from hold manually and its Order Total is
greater than or equal to $800. If the Order Total is less than $800, the system does not select any flag for the sales
order (that is, if the Order Total then increases and becomes greater than or equal to $800, the sales order is put on
hold automatically).
To modify the Remove Hold system action, perform the following instructions:
1. In the navigation pane of the Customization Project Editor, select Screens > SO301000 > Actions.
Customizing Workflows with a Workflow-Identifying Field | 97

The SO301000 (Sales Orders) Actions page opens.


2. In the table, click the releaseFromHold link in the Action Name column.
The Action Properties dialog box opens.
3. On the Field Update tab of the dialog box, click Add Row on the table toolbar, and specify the following
settings in the added row:
• Field: SO Reviewed
• From Schema: Cleared
• New Value: =IIf( [CuryOrderTotal]>=800, True, False)
These settings will prevent the system from putting a sales order on hold again if the Order Total is
greater than or equal to $800. (The formula makes the system select the flag to True only if the Order
Total is greater than $800 when the sales order is removed from hold.)
4. Click OK to save your changes and close the dialog box.

For details on how to use formulas, see Functions and Operators.

Step 4: Modifying the Hold Action


The Hold system action is used to put a sales order on hold manually. You need to set the SO Reviewed flag to False
(that is, clear the SO Reviewed check box) for the sales order in this case, because the system will set the flag to
True when the sales order is removed from hold. You also need to set the SO On Hold flag to True for the sales order
to indicate that it has been put on hold manually.
To modify the Hold system action, while you are still working on the SO301000 (Sales Orders) Actions page of the
Customization Project Editor, perform the following instructions:
1. In the table, click the putOnHold link.
The Action Properties dialog box opens.
2. On the Field Update tab of the dialog box, click Add Row on the table toolbar, and specify the following
settings in the added row:
• Field: SO Reviewed
• From Schema: Selected
• New Value: Cleared
3. Click Add Row on the table toolbar again, and specify the following settings in the added row:
• Field: SO On Hold
• From Schema: Selected
• New Value: Selected
These settings indicate that a sales order has been put on hold manually.
4. Click OK to save your changes and close the dialog box.

You have modified the system actions as needed.

Workflow-Identifying Fields: To Test the Inherited Workflow

The following activity will walk you through the process of testing the customized workflow that you have created
for the Sales Orders (SO301000) form.
Customizing Workflows with a Workflow-Identifying Field | 98

Story
Acting as the system administrator, you need to publish your customization project and then test your changes on
the Sales Orders (SO301000) form to make sure that the customized workflow works as expected.

Process Overview
By starting on the Customization Projects (SM204505) form of Acumatica ERP, you will go to the Customization
Project Editor for your customization project and publish it. On the Sales Orders (SO301000) form, you will then test
the customized workflow.

System Preparation
Before you begin performing the steps of this activity, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Make sure that you have learned how to test a customization, as described in Testing of the Customization:
General Information.
3. Make sure that you have completed the Workflow-Identifying Fields: To Modify System Actions activity.

Step 1: Publishing the Customization Project


Publish your customization project as follows:
1. On the Customization Projects (SM204505) form, click the SalesOrdersCheckHold project name to open the
customization project.
2. On the menu of the Customization Project Editor, click Publish > Publish Current Project.
3. Aer the system finishes updating the required data, click Close Compilation Pane.

Step 2: Testing Your Changes


In Acumatica ERP, test your changes as follows:
1. Open the Sales Orders (SO301000) form. If you already have the form open, refresh it.
2. Create a new sales order with the following settings:
• Customer: CITRUS
• Description: Equipment order
3. On the Details tab, click Add Row, and specify the following settings in the row:
• Inventory ID: BLADE12
• Quantity: 3
4. Save your changes.
Notice that the system has changed the status to Open because the Order Total is less than $800.
5. Change the value in the Quantity box to 9.
6. Save your changes.
Customizing Workflows with a Workflow-Identifying Field | 99

Notice that the status of the sales order has changed to On Hold because the Order Total is now greater
than $800.

You have tested the changes in your published customization project.


Upgrading Workflows | 100

Upgrading Workflows
Acumatica developers may modify the predefined workflows associated with inherited workflows that you have
modified. In this chapter, you will learn how to upgrade the inherited workflows aer these updates have been
made to the predefined workflows they are based on.

Upgrade of a Workflow: General Information

A customization project might contain inherited workflows—that is, customized workflows based on predefined
workflows. You can upgrade an inherited workflow in a customization project, as described below, and it is also
upgraded at runtime.

Learning Objectives
In this chapter, you will learn how to upgrade an inherited workflow in a customization project.

Applicable Scenarios
You upgrade an inherited workflow if the predefined workflow on which the inherited workflow is based has been
upgraded in the system.

Upgrade of Predefined and Inherited Workflows


If a customization project contains a workflow, every time a customizer opens this customization project in the
Customization Project Editor, the Acumatica Customization Platform checks whether the current version of all
predefined workflows and inherited workflows is up to date. If the version of the workflow in the customization
project is not up to date, the system displays the corresponding message and prompts you (or the customizer) to
upgrade the inherited workflows.
Even if a workflow has not been upgraded in the customization project and the Acumatica ERP instance has been
upgraded to the version with the upgraded workflow, only this upgraded workflow is used for the form. The
upgrades in a predefined workflow do not affect custom workflows (that is, workflows that have been created from
scratch).

During the upgrade, changes in the inherited workflow and the updated predefined workflow are
merged. If any conflicts occur, a pop-up window appears that contains detailed information about the
conflicts.

Upgrade of a Workflow: To Upgrade a Customized Workflow

The following activity will walk you through the process of upgrading an inherited workflow in the Customization
Project Editor.

This activity is based on the U100 dataset. If you are using another dataset, or if any system settings
have been changed in U100, these changes can affect the workflow of the activity and the results of
the processing. To avoid any issues, restore the U100 dataset to its initial state.
Upgrading Workflows | 101

Story
Suppose that aer you have created an inherited workflow for the Opportunities (CR304000) form, Acumatica
developers have modified the predefined workflow for this form. Acting as the system administrator, you need to
upgrade the inherited workflow so that it contains the changes introduced in the predefined workflow.

Process Overview
In this activity, you will upgrade the predefined workflow by using the OpportunitySystemWorkflowChanges.zip
file, which has been provided for this course and contains the customization package whose project you will use.
You will then upgrade the inherited workflow of the Opportunities (CR304000) form; you created this customized
workflow in Inherited Workflows: To Create an Inherited Workflow.
In the provided project, the Review state and the Need Review action have been added to the predefined
opportunity workflow.
By using the Customization Projects (SM204505) form, you will import the customization project from the
provided OpportunitySystemWorkflowChanges.zip file and publish this project. You will then apply changes to the
Opportunities workflow on the same form.

System Preparation
Before you begin upgrading the workflows, do the following:
1. Launch the Acumatica ERP website with the U100 dataset preloaded, and sign in as system administrator by
using the gibbs username and the 123 password.

The gibbs user is assigned the Administrator role, which has sufficient access rights to
customize workflows.

2. Unpublish all customization projects that have been published for the instance.

Step 1: Upgrading the Predefined Workflow


To upgrade the predefined workflow of the Opportunities (CR304000) form, perform the following instructions:
1. Open the Customization Projects (SM204505) form.
2. On the More menu, click Import.
3. In the Open Package dialog box, which is opened, click Choose file, and select the
OpportunitySystemWorkflowChanges.zip file.
4. In the Open Package dialog box, click Upload.
The OpportunitySystemWorkflowChanges customization project is added to the list on the Customization
Projects form.
5. Select the unlabeled check box in the row with the OpportunitySystemWorkflowChanges customization
project.
6. On the More menu, click Publish.
The system publishes the customization project, and the predefined opportunity workflow in your
Acumatica ERP instance is upgraded.
Upgrading Workflows | 102

Step 2: Applying Changes to the Inherited Workflow


To upgrade the inherited workflow with the changes from the predefined workflow, perform the following
instructions:
1. On the Customization Projects (SM204505) form, click the link with the Opportunities customization project.
The Customization Project Editor opens for the Opportunities customization project.
2. In the table on the Customized Screens page, notice that the system displays a warning icon in the Screen
ID column.
3. In the navigation pane, click Screens > CR304000 > Workflows.
The CR304000 (Opportunities) Workflows page opens. Notice that the system displays a warning icon for the
State Identifier box.
4. On the More menu (under Actions), click Upgrade Predefined Workflow.
The Upgrade Conflicts dialog box opens, as shown in the following screenshot. The dialog box contains
information about the conflicts.

Figure: The message about conflicts during upgrade

5. In the dialog box, click OK to resolve the conflicts and merge the changes.
As a result, the predefined workflow in the customization project and the inherited workflow that you
have created in Inherited Workflows: To Create an Inherited Workflow are modified: All the changes from the
OpportunitySystemWorkflowChanges.zip customization project are added to the predefined workflow and to
the inherited workflow.
6. In the navigation pane of the Customization Project Editor, click Screens > CR304000 > Workflows >
OpportunitiesAssigned.
The CR304000 (Opportunities) State Diagram: OpportunitiesAssigned page opens. The inherited workflow
should look as shown in the following screenshot. Notice that the Review state, which has been added from
the modified predefined workflow, is marked as inherited.
Upgrading Workflows | 103

Figure: The upgraded inherited workflow

You have upgraded the predefined workflow and applied the changes to the inherited workflow.

You might also like