Loading tutorials
try/catch, and know that Apex runs in a transaction with governor limits. It covers what a DML statement does when a record fails, and how to read the DmlException it throws.2 min readtry/catch. It also assumes you know that Apex runs in transactions with governor limits. The previous chapters covered DML statements and DmlException. Here you meet the second way to write records.2 min readinsert and a Database method such as Database.insert.2 min readDatabase.insert(records, false) from the previous chapter on allOrNone.2 min readDatabase.insert with allOrNone set to false. Here you will learn to read the details of each failure.2 min readtry/catch works, and that Database.insert(records, false) returns a list of result objects. Here you will use those results to decide what to do about each failed record.2 min readinsert or Database.insert changes how errors are reported. It does not change how much DML you are allowed to do.2 min readDmlException, the allOrNone parameter, and the result objects from earlier chapters.2 min readDatabase.insert with the allOrNone flag. Here you will use a Database.DMLOptions object to change how a DML call 2 min readDatabase methods, allOrNone, and SaveResult-style result objects from earlier chapters.3 min readinsert and Database.insert. It covers how to undo DML you have already run in the same transaction.3 min read