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.
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.
A brute way of doing it is:
die("it can't be done.");
Or you can:
SugarApplication::appendErrorMessage('<div style="color:#555; border-radius:10px; font-family:Tahoma,Geneva,Arial,sans-serif;font-size:11px; padding:10px 10px 10px 36px; margin:10px; border:1px solid #f5aca6; background:#ffecec 50%;">
<span style="font-weight:bold; text-transform:uppercase;">it can't be done.</span></div>'
);