How to stop record from saving into the database by using hook if a condition has meet?
and if the condition has not meet, proceed with the save?
it is better to do in the JS file. What condition do you have?
Just an idea, not sure if it would work:What if you check the condition in a before_save logic hook and if the condition is met redirect back to the original record.
If it's okay to do it front end you can use, Field Validation.
An alternative would be to replace the new values with the old ones
$bean->leadid_c = $bean->fetched_row['leadid_c'];
Retrieving data ...