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

Duplicate ID in list causes whole UPDATE to fail although allOrNone is set to false

Asked by Alex Duncan Apr 16, 2021 830 views 1 answer
Share

About this question

A duplicate ID in my list of SObjects "businessPartnerListToUpdate"

Database.SaveResult[] saveResultList = Database.update(businessPartnerListToUpdate, false);

causes an Exception to be thrown: System.ListException: Duplicate id in list: 0011r00001mIDEAAA4 I was having the assumption that since I set allOrNone to false, the rest of the records will still succeed, but this is not the case. Why is this so?

Your answer

1 Answer

More AWS discussions

Learn & Explore

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

Latest AWS Blogs

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