Creating Validation Rules for Tax Registration Number

The options below enable you to create validation rules on the Account and Accounting Company objects. These rules require the Tax Registration Number field on each object to be mandatory. The rules apply when an account or accounting company is created or an existing one is edited. For general information about creating validation rules, see the Salesforce Help.

Error Condition Formula

In the Error Condition Formula field, enter the following for the Account object:

Copy
OR(ISNULL(c2g__CODAVATRegistrationNumber__c), ISBLANK(c2g__CODAVATRegistrationNumber__c))

For the Accounting Company object, enter the following:

Copy
OR(ISNULL(c2g__VATRegistrationNumber__c), ISBLANK(c2g__VATRegistrationNumber__c))

Error Message

Complete the following steps:

  1. In the Error Message field, enter the message to display when the validation rule is not followed, for example: Complete this field.
  2. In the Error Location field, select Field.
  3. Select "Tax Registration Number" in the drop-down list.

The error message will display under the Tax Registration Number field when trying to save and the field is not populated.