Consider the following code snippet for a Visualforce page that is launched using a Custom Button on the Account detail page layout.

When the Save button is pressed the developer must perform a complex validation that involves multiple objects and, upon success, redirect the user to another Visualforce page.
What can the developer use to meet this business requirement?
Correct Answer: C
Why Controller?
A customcontrollerallows:
Complex validation involving multiple objects.
Redirection to another Visualforce page upon success.
Controllers can implement custom save logic and redirect usingPageReference.
Why Not Other Options?
A: Apex: Apex is the underlying programming language, but a controller specifically handles the Visualforce logic.
B: Trigger: Triggers execute on DML events, not on button clicks in Visualforce.
D: Extension: Extensions enhance standard controllers but are not necessary here since a custom controller is being built.
References:Controllers and Extensions:https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages
/pages_controller_custom.htm