Exam PDI Topic 3 Question 39 Discussion

Actual exam question for Salesforce's PDI exam
Question #: 39
Topic #: 3
A developer is creating a Lightning web component to show a 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?

Suggested Answer: B Vote an answer

UsingSecurity.stripInaccessibleensures compliance with field-level security (FLS) and prevents users from accessing fields they do not have permission to view. In this scenario:
* The commission field is inaccessible to Sales Assistants, andSecurity.stripInaccessiblewill automatically remove this field from the result set.
* It prevents runtime errors when a user without proper access attempts to retrieve restricted fields.
Reference:Apex Developer Guide: Security.stripInaccessible

by auabi14 at Jul 15, 2026, 11:42 PM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

0
0
0
10