Question: I’m writing a validation business rule in SalesLogix but I don’t know how to create an error to display in the Windows client. The ContactDetails form has the business rule HasPropgationChanges, but I would like to add additional rules to it before saving. Since I can only have one business rule I can’t set another with a “Show Message” option.
How can I display messages to users about various validation points on a form?
Answer: You can put an exception in a validation business rule. This will pop-up a message to the user and terminate further execution:
throw new Sage.Platform.Application.ValidationException(“MyField is required”);
Then set the save button to call the validation rule followed by the save method. If any exceptions occur, the save won’t fire.