You need to subscribe to the CustomNextStep event of the WizardDialogController controller. For an example, you can look in our FeatureCenter demo example how to sneak up on the CustomNextStep event (see the popupWindowShowAction1_CustomizePopupWindowParams event handler in the FeatureCenter.Module\Wizard\WizardsViewController file). In the CustomNextStep event handler, you need to check the object using the RuleSet.ValidateTarget (IObjectSpace, Object, ContextIdentifiers) method. For instance: void controller_CustomNextStep(object sender, CustomNextStepEventArgs e) { var controller = (WizardDialogController)sender;
RuleSetValidationResult result = Validator.RuleSet.ValidateTarget(this.Application.CreateObjectSpace(), controller.Frame.View.CurrentObject, ContextIdentifier.Save); if (result.ValidationOutcome > ValidationOutcome.Information) { e.NextStep = e.CurrentStep; } else if (e.CurrentStep.Index == 0) { if (!string.IsNullOrEmpty(e.WizardObject().String1) && e.WizardObject().String1.StartsWith("1")) e.NextStep = e.CurrentStep.Wizard[2]; } } |