At least its a bit complicated from my point of view, but I was hoping I could get some advice on how to handle it.

I have a business object "Customer" with fields like "Status", "AccountRep", and "SupportLevel." There are several rules associated with Customer including the following two:1. If Status = "New", then SupportLevel must = High2. If Status = "New", then AccountRep cannot be null

In the GUI, Status is bound to a ComboBox. When the user chooses "New" from the ComboBox is where my problem begins. "New" is a valid choice for Status, so if AccountRep field is null, the rule is broken. Status should not display an error, however, AccountRep should, but the rule really should be fired when Status is changed (I want to show the user visually when he changes the Status that he mush fill out AccountRep also). And the rule should also be applied (in reverse I guess) when the user changes the AccountRep comboBox.

I guess my question is how to handle a situation where one field fires the rule, but the error should be displayed on another field?

If any of that needs clarification, please let me know :)Thanks for any insight,Matthew

Any rule involving more than one property should be applied only at instance validation, not in response to the setting of an individual property (pre- or post-set validation). In other words, the values of the two (or more) properties that are involved in the rule should not be tested for correctness until you are validating the entire object. This permits either value to be set freely, independently of the other; but the freedom ends when the instance is validated in its entirety.

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot delete your posts in this forumYou cannot edit your posts in this forumYou cannot create polls in this forumYou cannot vote in polls in this forum