Customizing Account Validation
This is an optional, but highly recommended, task that prevents users from changing the account currency on an Account that is active within Accounting. The error condition is based on the existence of an accounts payable or accounts receivable control account.
To create the new validation rule:
- From Setup, click Customize | Accounts | Validation Rules.
- Click New.
- Enter the properties of your validation rule. Our suggestions are as follows:
Property Value Name Lock_Account_Currency Active Error Condition Formula AND(
ISCHANGED( CurrencyIsoCode ),
OR(
NOT( ISBLANK( c2g__CODAAccountsReceivableControl__c )),
NOT( ISBLANK( c2g__CODAAccountsPayableControl__c ))
)
)Error Message This Account is in use by Accounting. You cannot change its currency. Error Location Field: Account Currency - [Optional] Click Check Syntax to check your formula for errors.
- Type an appropriate error message to display when Error Condition Formula is true.
- Click Save.
Once this validation rule is saved and activated, users will get an error message if they try to change the account currency on an Account that has a defined accounts payable or accounts receivable control account.
See the Salesforce Help for more information.