Custom Field Validations on Each Step of Enrollment Wizard
This workflow performs custom validations on each step of the Anthology Student Enrollment wizard. This workflow example is described at a high level using screen captures for the main sequences, rather than describing each step in detail. The workflow is triggered by a Saving event using the contract Cmc.Nexus.Contracts > Cmc.Nexus > Person.
Note: When the Student Enrollment wizard uses a Person Saving event, each step only fills out a few fields in the Person.Students(0).StudentEnrollmentPeriods(0) entity based on the step Context.
The top level sequence contains a Switch activity based on the args.Context for each step of the enrollment wizard, plus a default case.
-
The first case creates an error message when the value "Homeschooled" is selected in the Previous Education field of the Enrollment wizard.
The custom validation message for this case is as follows:
-
The second case performs custom validations on the Program and Grade Level selections.
-
If the student's residence is in Alaska, the student is not allowed to enroll in a "Golf" program.
-
If Grade Level High School (8) is selected, an error message states "Grade Level cannot be High School".
Note: You can hard code the grade level value to compare to (i.e., "8") or use a LookupReferenceItem activity instead.
The custom validation message for this case is as follows:
-
-
The third case checks for an entry in the Start Term field.
The custom validation message for this case is as follows:
-
The fourth case checks for an entry in the Extern Start Date field.
The custom validation message for this case is as follows:
-
The last case checks for an entry in the Comment field.
The custom validation message for this case is as follows: