問題文
An online pet supplies store sends a shipment confirmation from an after-update trigger by calling the email send method once per record. A promotion causes 400 orders to ship in one data load and the load fails. What has been exceeded and how is it avoided?
選択肢
- The daily allocation of outbound email for the org was exhausted, and the fix is to raise that allocation, because the number of addresses an org may send to in a day is an administrator setting.
- A transaction may call the email send method only 10 times, so move the send into a future method and call that method once per record that the loop has collected in a run.
- The 150 data manipulation statements were exceeded, because sending an email counts as one such statement against the total that the transaction is allowed to issue in one go.
- A transaction may call the email send method only 10 times, so build one list of messages in the loop and hand the whole list to a single call after the loop finishes.