Lightning Web コンポーネントから起動されるカスタム検索機能を備えた Apex クラスを開発する際に、開発者は現在ログインしているユーザーがアクセスできるレコードのみが表示されるようにするにはどうすればよいでしょうか?
正解:A
* Why WITH SECURITY_ENFORCED? * Ensures field-level security and sharing rules are enforced in SOQL queries. * Prevents unauthorized records or fields from being accessed or displayed. * Why Not Other Options? * B and C: with sharing and inherited sharing enforce record-level access but do not handle field- level security. * D: without sharing ignores sharing rules, which would display all records regardless of user permissions. * Security in SOQL: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode /apex_classes_with_security_enforced.htm References: