A developer is migrating a Visualforce page into a Lightning web component.
The Visualforce page shows information about a single record. The developer decides to use Lightning Data Service to access record data.
Which security consideration should the developer be aware of?
Show answer and explanation
Correct answer: C
Why Lightning Data Service?
Enforces Salesforce's security model, including:
Sharing rules.
Field-level security (FLS).
This eliminates the need for additional manual security checks.
Why Not Other Options?
A: Incorrect, LDS enforces FLS.
B: with sharing applies to Apex, not Lightning Data Service.
D: isAccessible() is unnecessary for LDS because it already enforces FLS.
Lightning Data Service:
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/
data_service.htm