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:

  1. From Setup, click Customize | Accounts | Validation Rules.
  2. Click New.
  3. Enter the properties of your validation rule. Our suggestions are as follows:
    PropertyValue
    NameLock_Account_Currency
    Active
    Error Condition Formula

    AND(
    ISCHANGED( CurrencyIsoCode ),
    OR(
    NOT( ISBLANK( c2g__CODAAccountsReceivableControl__c )),
    NOT( ISBLANK( c2g__CODAAccountsPayableControl__c ))
    )
    )

    Error MessageThis Account is in use by Accounting. You cannot change its currency.
    Error LocationField: Account Currency
  4. [Optional] Click Check Syntax to check your formula for errors.
  5. Type an appropriate error message to display when Error Condition Formula is true.
  6. 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.