When using before_save in SugarCRM 6.5 how do I stop the save?

I am going to use before_save to review a Merge before it completes. 

If both Contact records have the two different Student Ids, I want to stop the process and display a message saying it can't be done.

Parents
  • Try paste this when you need show error:

    require_once 'include/api/SugarApiException.php';
    throw new SugarApiExceptionInvalidParameter("It can't be done");
    
  • I don't believe that works with 6.5. Plus I don't have the file include/api/SugarApiException.php in the SugarCRM 6.5 instance.

Reply Children
No Data