Salesforce Platform Developer I (legacy) — Question 74
A Visualforce page is required for displaying and editing Case records that includes both standard and custom functionality defined in an Apex class called myControllerExtension.
The Visualforce page should include which <apex:page> attribute(s) to correctly implement controller functionality?
Answer options
- A. controller=ג€Caseג€ and extensions=ג€myControllerExtensionג€
- B. extensions=ג€myControllerExtensionג€
- C. controller=ג€myControllerExtensionג€
- D. standardController=ג€Caseג€ and extensions=ג€myControllerExtensionג€
Correct answer: D
Explanation
The correct answer is D because it specifies both the standardController for Case records and the extension for additional functionality through myControllerExtension. Options A and C are incorrect as they either miss the standardController or incorrectly assign the extension. Option B lacks the necessary standardController attribute, which is essential for displaying Case records.