
The challenge is as follows:
- A contact with a MailingPostalCode that has an account and does not match the associated Account ShippingPostalCode should return with a validation error and not be saved
- The validation rule should ONLY apply to contact records with an associated account. Contact records with no associated parent account can be added with any MailingPostalCode value. (Hint: you can use the ISBLANKfunction for this check)
Please help, it's drivng me nuts!
1 respuesta
Hi Susan,
Let's try something like this:
AND (
NOT ISBLANK(AccountId),
Account.ShippingPostalCode != MailingPostalCode
)
The NOT ISBLANK part checks that the contact is actually related to an account, and the second part compares the postal to the account's shipping code.