nerdexam
Salesforce

PDI · Question #82

A developer is creating a Lightning web component to showa list of sales records. The Sales Representative user should be able to see the commission field on each record. The Sales Assistant user shou

Sign in or unlock PDI to reveal the answer and full explanation for question #82. The question stem and answer options stay visible for context.

Submitted by devops_kid· Apr 18, 2026Logic and Process Automation

Question

A developer is creating a Lightning web component to showa list of sales records. The Sales Representative user should be able to see the commission field on each record. The Sales Assistant user should be able to see all fields on the record except the commission field. How should this be enforced so that the component works for both users without showing any errors?

Options

  • AUse WITH SECURITY_ENFORCED in the SOQL that fetches the data for the component.
  • BUse Security. stripInaccessible to remove fields inaccessible to the current user.
  • CUse Lightning Data Service to get the collection of sales records.
  • DUse Lightning Locker Service to enforce sharing rules and field-level security.

Unlock PDI to see the answer

You've previewed enough free PDI questions. Unlock PDI for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#Field-Level Security (FLS)#Apex Security#Data Filtering#Lightning Web Components (LWC)
Full PDI Practice