May 2019
Intermediate to advanced
546 pages
12h 41m
English
Use the short DML statements—to get any error that occurs during bulk DML processing that immediately interrupts the control flow (by using a try...catch construction). This behavior is similar to how exceptions are handled in most database languages.
Use the Database class methods—if you want to allow partial successes of a bulk DML operation. The DML statement can inspect the rejected records. When using this flow, you can write code that never throws a DML exception error. Instead, your code can use the database results list to judge success or failure.
Read now
Unlock full access