フリー問題

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

問題文

A ferry operator's booking component decides the cancellation fee in its JavaScript, reading three fields and applying four rules. The team has no JavaScript test setup and the finance department demands evidence that the rules are right. Where should the rules live?

選択肢

  1. In a formula field on the booking object, because a declarative calculation needs no test of its own and a component can then simply display the field that the platform maintains.
  2. In the component, because keeping the calculation next to the display avoids a server round trip for every fee that has to be recalculated there.
  3. In Apex, and the component should then call it through the wire adapter for every keystroke so the fee is always current, which also means the calculation is covered by the Apex tests that finance wants to see.
  4. In Apex, where the platform's own test framework can assert each rule and the coverage requirement applies, leaving the component to display what the server returns, because Apex is the layer the platform's own test framework can exercise directly.

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

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