April 2016
Intermediate to advanced
256 pages
4h 57m
English
As in the case of the previous anti-pattern, Salesforce imposes another governor limit known as total number of DML statements issued in a single request. As the name implies, it restricts the number of Data Manipulation Language (DML) statements. For example, insert, update, delete, undelete, and so on.
You can get a comprehensive list of all the DML statements in the official documentation at https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_gov_limits.htm.
Our business requirement is to create a contact for each account inserted. So, we developed our code, as follows:
trigger AccountCreation on Account (after insert) { /* Iterate over all accounts inserted */ for(Account account : Trigger.new){ ...
Read now
Unlock full access