Account Validation rule example
The Account rule set contains validation rules for Account objects (as expected). Accounts are a special type of validatable entities. PolicyCenter does not automatically validate Account objects as it validates other high-level entities. Unlike other objects, changes to policy data do not automatically trigger account validation on bundle commit in rules-based validation. PolicyCenter validates an Account entity only on bundle commits that actually affect the Account entity, such as in the Account Setup pages.
In the following example, the rule rejects an account if the account holder contact information does not contain a value for the work phone number.
CONDITION (account : entity.Account):
return account.AccountHolderContact.WorkPhone == null
ACTION (account : entity.Account, actions : gw.Rules.Action):
account.reject( TC_LOADSAVE, "You must provide a work phone number for the primary contact.", null, null)
