フリー問題

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

問題文

A textile mill needs the same pricing calculation to run from a trigger, from a screen flow that buyers use, and from an inbound endpoint that a partner calls. What design lets one implementation serve all three callers?

選択肢

  1. Put the calculation in three places and keep them aligned by review, because each caller has a different shape of input.
  2. Put the calculation in an invocable method for the flow and have the trigger and the endpoint launch that flow, because a flow can be started from Apex and this keeps the business rule in a place that administrators can maintain without a developer being involved.
  3. Put the calculation in the trigger and let the flow and the endpoint update the record so that the trigger fires for them too.
  4. Put the calculation in a service class whose methods take and return collections, and give it three thin entry points: a trigger handler, an invocable method for the flow, and an Apex REST class, because a thin entry point carries only the translation from its own caller's shape into the collection the service expects.

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

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