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:
OR(ISNULL(c2g__CODAVATRegistrationNumber__c), ISBLANK(c2g__CODAVATRegistrationNumber__c))
For the Accounting Company object, enter the following:
OR(ISNULL(c2g__VATRegistrationNumber__c), ISBLANK(c2g__VATRegistrationNumber__c))
Error Message
Complete the following steps:
- In the Error Message field, enter the message to display when the validation rule is not followed, for example: Complete this field.
- In the Error Location field, select Field.
- 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.
SECTIONS