title: Solution to avoid a record from being inserted in Salesforce
body: <p>I am in need of stopping a record from being inserted when a certain condition is met. I made this change in beforeInsert of my trigger with the help of addError().
  I have an issue with this solution: <a href="https://stackoverflow.com/questions/55635709/apex-adderror-remove-default-error-message">apex addError - remove default error message</a>.
  I want to remove this default error message and keep only my customized message. And I want to make this bold and bit bigger too. I am now convinced that these things are not possible with addError().</p>
  
  <p>Is there any alternative solution to this? I mean, to stop this record from being inserted?</p>
  
  <p>My object in concern is ObjectA. And ObjectA has a lookup to ObjectB. This ObjectB field in ObjectA has to be unique. No two ObjectA records can contain the lookup to same ObjectB field. That's when I need to stop this insertion.</p>
  
  <p>Can someone help me with this?</p>