preEdit business rule
preEdit business rule
rwgreenwood
Posts: 43Questions: 13Answers: 0
in Editor
I need to validate a record based on a business rule. I am looking at the preEdit event. From there, I need to do an additional query to the database to verify a business rule limit based on other entries. My first question is am heading down the right path? Is this possible to do from preEdit or is there a better place? I am also looking for documentation that would show how to handle an error returned from such a validation. Thanks.
This discussion has been closed.
Answers
Hi,
The global validation might actually be the best option for what you describe. You could use
preEdit
since it is cancelable, but its not so easy to return validation error messages to the client-side. The validation methods make that much easier.Regards,
Allan
Thanks for the reply. I see what you mean about returning messages from the preEdit - I haven't figured that out yet. Do you have any examples? I'll look at global validation as well.
I don't have any example of that as such as it isn't really designed for that. The validation errors should be returned by the validation functions.
Allan
Alan, I got a query and return in the global validation to work for what I need. Thanks for your help.