Salesforce Certified Platform Developer II — Question 158

An org has a requirement that the Shipping Address on the Account must be validated by a third-party web service, before the Account is allowed to be inserted. This validation must happen in real-time before the account is inserted into the system. Additionally, the developer wants to prevent the consumption of unnecessary SME statements.

What is the optimal way to meet this requirement?

Answer options

Correct answer: A

Explanation

The correct answer is A because using a custom Visualforce controller allows for real-time validation of the Shipping Address before insertion, fulfilling the requirement. Options B and D are incorrect as triggers do not support callouts in the before or after context, and option C does not allow for the customization needed for this specific requirement.