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: A
A custom controller is an Apex class that uses the default, no-argument constructor for the outer, top-level class. You cannot create a custom controller constructor that includes parameters. A custom controller is needed to perform complex validation that involves multiple objects and then redirect the user to another Visualforce page upon success. A custom controller can override the standard actions of a standard controller, such as save, edit, view, or delete, and define new actions. A custom controller runs in system mode, so the user's permissions and field-level security do not apply. References: You can find more information about custom controllers in the Visualforce Developer Guide and the Apex Developer Guide on Salesforce's official website.
Recent Comments (The most recent comments are at the top.)
B is the correct answer.
correct answer is B - CONTROLLER EXTENSION
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_extension.htm