フリー問題

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

問題文

Inside an after update trigger on Shipment__c, code needs to compare each record's new carrier value with its previous value. Which context variable choice lets the code look up the old version of a specific record by its identifier?

選択肢

  1. Query the object inside the loop, because the old version is not available in an after update trigger, and the query returns the value as it stood just before the save.
  2. Iterate the new records and read the matching previous version from the map of old records, keyed by the record identifier, because the map of old records is keyed by identifier for exactly this lookup, while a position in a list is only incidental.
  3. Read the old value from the same record instance in the new list, because during an update the platform keeps both versions on one object and exposes the previous value through a separate accessor on each field of the row.
  4. Iterate both lists with the same index, because the platform guarantees that the list of new records and the list of old records are in the same order, and the pairing holds for a bulk save.

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

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