Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

AllorNone inside Before insert Trigger - Duplicate Checking

Asked by Ben Phillips Jul 18, 2021 1.7K views 1 answer
Share

About this question

 Can someone explain to me in very simple how the AllorNone works in a before insert trigger?I was under the assumption that AllorNone is default false. I have a before insert trigger that checks for duplicates and uses addError() to prevent save. Test class fails in this scenario, insert 1 record -> insert list with one good, one duplicate.Is AllorNone not default false in a trigger? If not, any ideas on allowing partial save in a before insert trigger?


Your answer

1 Answer

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.