フリー問題

Salesforce Certified Platform Developer のフリー問題 8 / 20 問目

問題文

A subscription billing app stops a trigger from re-entering itself with a static Boolean that is set to true on the first pass. Support now reports that when a data load updates the same subscription twice in one request, the second update's logic never runs. What should replace the guard?

選択肢

  1. A custom setting that an administrator switches off before a data load and back on afterwards; the guard is not needed during the load during it and the logic runs for each update the load performs.
  2. A check on the recursion depth, comparing the current stack depth against the ceiling of 16 that applies when a trigger fires itself through a data manipulation statement, and skipping when it is close.
  3. Nothing, because the static Boolean is reset between the updates in the same request and the reported behavior must have another cause somewhere else in the handler class it calls.
  4. A static Set of the record Ids already processed, so the handler skips only the records it has genuinely handled and still processes every other record in the same transaction.

解答・解説を確認するには

正解と解説の確認、回答の記録には無料登録が必要です。登録すると演習モードでフリー問題に回答し、正誤と解説をその場で確認できます。