function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Manikanta maram 9Manikanta maram 9 

Hi to all, I'm New to APEX can anyone help how to solve this problem

Problem

The business wants to validate certain fields on Account object for new accounts that are created or for updates to existing accounts.

Business Requirements

The following are the requirements that must be implemented:
 
  1. Ensure that the Billing Country and Shipping Country fields have a valid ISO country code, as per the CSV data sheet provided.
    1. You will find a CSV called ‘CountryList’ in the Static Resources of the sandbox
  2. The VAT Number is required for some EUROPEAN countries, check if the VAT Number is required from the CSV data sheet provided.
  3. Insert the region value into the Region field on Account object for valid records.
  4. Ensure support for user specific local error messages so global offices can use this application.
  5. A VAT Number should be in the following format:
    1. ISO country code - 10 digits example: AF-0123456789
  6. Error messages should be shown appropriately for incorrectly formatted VAT number: “An incorrectly formatted VAT number was entered”