Salesforce Platform Developer I (legacy) — Question 52
A developer needs to create a Visualforce page that displays Case data. The page will be used by both support reps and support managers. The Support Rep profile does not allow visibility of the Customer_Satisfaction__c field, but the Support Manager profile does.
How can the developer create the page to enforce Field Level Security and keep future maintenance to a minimum?
Answer options
- A. Create one Visualforce Page for use by both profiles.
- B. Use a new Support Manager permission set.
- C. Create a separate Visualforce Page for each profile.
- D. Use a custom controller that has the with sharing keywords.
Correct answer: A
Explanation
The correct answer is A because creating one Visualforce Page allows the application of Field Level Security across both profiles, ensuring that each user sees only the fields they are permitted to access. Options B and C would complicate maintenance by requiring multiple pages or permission sets, while D may not adequately enforce the desired field visibility for both profiles without additional complexity.