Highlighting dynamic step with validation error
If validation fails on a step dynamically generated by a Wizard Step Iterator, the error message can link to that step.
You can find an example in Inland Marine, whose wizard adds steps dynamically when you add coverage parts. This example generates a page-level validation error. Through configuration, you can implement this as a field-level validation error. You can trigger this validation if you define more than one sign with the same values for location, description, sign type, and interior. However, because you cannot navigate away from this page until you fix the error, you cannot verify that the error links to the step.
- Add a method that validates the dynamic steps.
For an example, see the handleValidationForDynamicSteps method in IMLineValidation.gs.
- In the PCF file, set the
handlesValidationIssueproperty to the method that validates the dynamic steps.For an example, see LineWizardStepSet.InlandMarine.pcf. In the PCF file, highlight the
JobWizardStepinside theWizardStepIterator. In Advanced Properties, the value ofhandlesValidationIssueproperty is the handleValidationForDynamicSteps method. -
Add a validation that gives the dynamic wizard step (the generic parent) as the step with the issue. For example, see ContractorsEquipmentPartValidation.gs:
Result.addError( _equipPart, TC_DEFAULT, <Display Key for error message>, "impartstep")
