Skip to main content
I am trying to complete the Create Validation Rules Trailhead, however, no matter what I try, I cant seem to write the correct formula to be able to complete the challenge.

 

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개
  1. 2019년 1월 25일 오후 3:08
    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.
0/9000