Step 1: Defining a Dialog Box
In this step, you will define and configure the Assign dialog box.
Do the following:
- In the Configure method of the
RSSVWorkOrderWorkflow
class, define the Assign dialog box, as the following code shows.protected static void Configure(WorkflowContext<RSSVWorkOrderEntry, RSSVWorkOrder> context) { // Define the Assign dialog box var formAssign = context.Forms.Create("FormAssign", form => form.Prompt("Assign").WithFields(fields => { })); ... }
In the code above, you have declared the
FormAssign
dialog box with the Assign title. - Inside the lambda expression for the WithFields method, add
the
Assignee
field, which will be displayed in the dialog box.fields.Add("Assignee", field => field .WithSchemaOf<RSSVWorkOrder.assignee>() .IsRequired() .Prompt("Assignee"));
In the code above, you have added the
Assignee
field to the dialog box. You have copied the field configuration from theRSSVWorkOrder.assignee
field by specifying this DAC field in the WithSchemaOf method. You have specified that the field is required by calling the IsRequired method, and you have specified the UI name of the field in the Prompt method. - Register the dialog box in the screen configuration by calling the
WithForms method in the lambda expression for the
AddScreenConfigurationFor method, as the following code
shows.
.WithForms(forms => forms.Add(formAssign))