Step 1: Defining a Dialog Box

In this step, you will define and configure the Assign dialog box.

Do the following:

  1. 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.

  2. 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 the RSSVWorkOrder.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.

  3. 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))