Salesforce Certified Platform Developer II — Question 156
The Account edit button must be overridden in an org where a subset of users still uses Salesforce Classic. The org already has a Lightning Component that will do the work necessary for the override, and the client wants to be able to reuse it.
How should a developer implement this?
Answer options
- A. Override the edit button for both Lightning and Classic with a Lightning Component
- B. Override the edit button for both Lightning and Classic with a new Visualforce page
- C. Override the edit button for Lightning with a Lightning Page, and for Classic, override the edit button with a Visualforce page that contains the Lightning Component
- D. Override the edit button for Lightning with a Lightning Component, and for Classic, override the edit button with a Visualforce page that contains the Lightning Component
Correct answer: C
Explanation
The correct answer, C, allows for the use of the Lightning Component specifically in Lightning while maintaining compatibility with Classic through a Visualforce page. Option A incorrectly suggests using only a Lightning Component for both environments, which is not possible in Classic. Option B does not utilize the existing Lightning Component, and option D, while similar, does not specify the need for a Lightning Page in Lightning, thus making C the best choice.