問題文
A dental laboratory needs a component that lets technicians edit six fields on a case record. A developer has written an Apex controller and is now adding describe calls to check read and edit access on each of the six fields before saving. What is the better use of the team's effort?
選択肢
- Keep the Apex controller and rely on the page layout, since the six fields are hidden from users who lack access to them and the controller therefore never receives values for fields the running user is not allowed to see.
- Keep the Apex controller but replace the describe calls with a query that specifies user mode, because the documentation notes that this clause reports only the first access error it meets.
- Keep the Apex controller but declare the class with sharing, which covers each of the field access checks that the developer is currently writing out by hand.
- Build the editor from the base components backed by Lightning Data Service, which is the documented recommendation because that layer already handles sharing rules, object permissions, and field-level security.