I have a custom visualforce page with a standard controller and extension class. I have created my own save Function in which I need to first update the standard controller record that I am editing, then a couple of other things and return a custom page reference.
Saves the record correctly when there are no validation rules. However when there is a validation rule that gets activated, I can see that it appears in the debug log but the class just moves on and does not return null OR update the apex:pageMessages on the VF page.
What do I need to do with this save to have it catch any error messages, write it to apex page messages and return null.
Been trying to get more info on standard controller saves but everyone seems to have a different solution and to make things better none have worked so far.