Step 1: Investigating the Source Code
To begin customizing the predefined workflow, you need to investigate how the composite
workflow state is defined in it. In Step 2: Adding a Workflow Extension of the Workflow Customization: To Add an Action to an Existing Workflow
activity, you learned that the workflow for the Invoices
(SO303000) form is defined in the SOInvoiceEntry_Workflow
class and that
the states of the workflow are defined in the ARDocStatus class.
You will investigate the source code of the SOInvoiceEntry_Workflow
class
by doing the following:
- In Visual Studio, in the SmartFix_T270 website project, go to
App_Data/CodeRepository/PX.Objects/SO/Workflow, and open the
SOInvoiceEntry_Workflow.cs
file. - In the
SOInvoiceEntry_Workflow
class, locate theAddSequence<State.HoldToBalance>
method call. This call defines theHoldToBalance
composite workflow state. Notice the order in which the nested workflow states are defined, and locate thecreditHold
workflow state. After thecreditHold
workflow state, you can see thependingPrint
workflow state, which will be the next state for the newPostponed
state of the workflow. - Go to the definition of the ARDocStatus class, and note how the workflow states are defined.
- For the purpose of adding a new status value, learn the name of the field that holds the
status value on the Invoices (SO303000) form by using
the Element Inspector. This field is
ARInvoice.Status
.