フリー問題

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

問題文

A railway operator has one service class that is called both from an Aura component controller and from a nightly batch job that must see every record. Some fields on the object are hidden from the profile of the users who open the component. Which design handles all of the layers correctly?

選択肢

  1. Declare the service class with the without sharing keyword and rely on the clause that enforces security in each query, because that clause covers record-level sharing as well as object-level and field-level permissions and therefore removes the need to choose a sharing mode at all.
  2. Omit the sharing declaration, because a class without a declaration behaves the same as one declared with the inherited sharing keyword.
  3. Declare the service class with the inherited sharing keyword so that it enforces sharing when it is the entry point and follows its caller otherwise, and check object and field permissions in the code because no sharing mode enforces them.
  4. Declare the service class with the with sharing keyword, which enforces sharing rules and also applies the running user's field-level security to the fields the class reads, and the nightly batch then sees the same subset of records as the component's users.

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

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