Study for the Salesforce Platform Developer Exam. Study with flashcards and multiple choice questions, each question has hints and explanations. Get ready for your exam!

Practice this question and more.


Where would a developer write the Account address verification logic in a Visualforce page?

  1. In a Controller Extension.

  2. In a Custom Controller.

  3. In a Standard Controller.

  4. In a Standard Extension.

The correct answer is: In a Controller Extension.

The most appropriate place for a developer to write the Account address verification logic in a Visualforce page is in a controller extension. A controller extension enhances the functionality of a standard controller, allowing for added custom logic while still leveraging the built-in capabilities of the standard controller. Using a controller extension enables the developer to create reusable components that can add specific behavior or logic without the need to completely overwrite the existing functionality of the standard controller. This is particularly useful for tasks such as address verification, where you can write additional logic to validate the address fields without altering the structure or processes of the standard controller. A custom controller, on the other hand, would be an entirely new implementation that does not use the built-in capabilities of a standard object. While possible, this approach is often unnecessary for adding basic validation logic, as it would require more code to handle the standard functionalities that the extension is designed to enhance. Meanwhile, a standard controller simply provides the basic functionality for interacting with the Salesforce object but does not allow for additional logic like address verification. A standard extension is intended for augmenting existing capabilities of a standard controller, but it is not the commonly accepted term in the context of Salesforce development. Therefore, using a controller extension strikes the best balance between leveraging existing