A sales manager wants the 'Discount Percentage' field on the Opportunity object to be visible only to users with the 'Sales Manager' profile. How should the administrator configure this requirement?
Trap 1: Set the field visibility to hidden in the Lightning Record Page…
Component visibility in Lightning App Builder only hides the field on the page layout; it does not prevent users from accessing the data via reports, list views, or the API. Field-level security must be used to enforce actual data access restrictions at the user profile level.
Trap 2: Create a validation rule that restricts viewing based on the user's…
Validation rules are designed to prevent record saves when criteria are not met; they cannot hide fields from the user interface. Using validation rules for security purposes is an incorrect pattern because it does not restrict read access or data exposure through other platform features.
Trap 3: Change the page layout assignment for the Sales Manager profile to…
Page layouts determine which fields are displayed on the record detail page but do not secure the data itself. A user could still see the field in reports or list views if they have the proper object-level permissions, making page layouts insufficient for security.
- A
Set the field visibility to hidden in the Lightning Record Page component visibility settings.
Why it fails: Component visibility in Lightning App Builder only hides the field on the page layout; it does not prevent users from accessing the data via reports, list views, or the API. Field-level security must be used to enforce actual data access restrictions at the user profile level.
- B
Create a validation rule that restricts viewing based on the user's profile ID.
Why it fails: Validation rules are designed to prevent record saves when criteria are not met; they cannot hide fields from the user interface. Using validation rules for security purposes is an incorrect pattern because it does not restrict read access or data exposure through other platform features.
- C
Modify the Field-Level Security settings for the 'Discount Percentage' field on the Sales Manager profile.
Field-level security is the correct tool to control visibility of specific fields per profile. By checking the visible box for the Sales Manager profile and unchecking it for others, the administrator effectively restricts access to this sensitive data field across all areas of the application.
- D
Change the page layout assignment for the Sales Manager profile to a restricted layout.
Why it fails: Page layouts determine which fields are displayed on the record detail page but do not secure the data itself. A user could still see the field in reports or list views if they have the proper object-level permissions, making page layouts insufficient for security.