Hmm I had broken rules, so if broken rules exist that trumps ErrorSaving? |
Yes, but you can handle the BusinessRulesChecked event and set the e.IgnoreRulesAndForceSave to True and any rules will be ignored....if you have this need.
Can I easily display the BrokenRules collection to the user if the BO is not the forms PrimaryBusinessObject or will I have to code for that? |
Sure, we do this in our medical app so that they can tell when there are broken rules on other pages as well as on web applications. You can just enumerate the BrokenRules collection (either on the BO or in the BusinessRulesChecked event)
Dim msg As String = ""
For each rule as BusinessRules in MyBo.BrokenRules.ToArray()
msg &= rule.FieldName & ControlChars.CrLf & rule.Description
Next