Step 2: Extending the ARDocStatus class
Before you add the Postponed
state to the workflow, you need to add a
string constant and class to the extension of the ARDocStatus class. You
also need to add a corresponding value to the field that holds the record's status on the
Invoices (SO303000) form. Do the following:
- In the SOInvoiceRepairOrder_Workflow.cs file, extend the
ARDocStatus class by adding the following
code.
public class ARDocStatus_Postponed : ARDocStatus { public const string Postponed = "O"; public class postponed : BqlType<IBqlString, string>.Constant<postponed> { public postponed() : base("O") { } } }
- Add a combo box value to the Status box on the Invoices (SO303000) form by calling the
WithFieldStates method in the lambda expression for the
UpdateScreenConfigurationFor method, as the following code
shows.
.WithFieldStates(fs => { fs.Add<ARInvoice.status>(state => state.SetComboValue(ARDocStatus_Postponed .Postponed, "Postponed")); })
- Save your changes.