• sreelekha pateel 2
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
An Apex transaction insert 100 Account records and 2000 Contact records  before encountering a DML exception when attempting to insert 500 Opportunity records. The Account record are inserted by calling the database.insert() method with the allOrNone argument set to false. The Contact and Opportunity record are inserted using the stand-alone insert statement.
How many total records will be committed to the database in this transaction?
A. 100
B. 2,100
C. 2,000
D. 0

Considering the salesforce documentation of Database.insert() when allOrNone is false, the answer should be A i.e 100. But, when I checked this on Anonymous window in developer console I get answer as D i.e 0.

Please help me with this solution.