227k views
4 votes
There is a requirement to validate that the country code of an account field is a valid ISO code. There are over 200 codes. What could be used for this validation?

1) Before Update trigger on Account
2) After Update trigger on Account
3) Validation Rule
4) Formula Field

1 Answer

5 votes

Final answer:

The best option to validate the country code of an account field is to use a Validation Rule with a formula that checks if the country code value is a valid ISO code.

Step-by-step explanation:

The best option to validate the country code of an account field is to use a Validation Rule.

A validation rule allows you to define specific criteria that a record must meet before it is saved. In this case, you can create a validation rule with a formula that checks if the country code value is a valid ISO code.

For example, you can use the CASE function to check if the country code matches any of the valid ISO codes. If it doesn't match, the validation rule will prevent the record from being saved.

User The Dembinski
by
7.3k points