I am looking to create a point of validation before a save. I have a custom module called Sample Requests and when a salesman selects an account(Relate Field) to make a sample request for, I would like for them to be unable to save a new sample request based on whether that account has the primary address field filled or not.
Does anyone know how to do this? Looking into it, I get very confused because I cant find a working example. Thank you.
Another way will be to add a before save logichook to check if the required fields are not empty. Then proceed to save. If not. You can redirect yout URL to what ever module/page you want.
True, I will try this. I’m just not sure how I could write that. For example where can I state to check for a field within that related module. In my custom module id have to have a check for whether or not that Lead that is selected has the primary_address_street field filled or empty.