• Andrew R Kaeding
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
I am working on a Trailhead Quiz for Formulas & Validations Creating Validation Rules
https://developer.salesforce.com/trailhead/point_click_business_logic/validation_rules
The quiz wants to validate a zip code rule for a contact to match zip code with account UNLESS this a a contact with no account associated.
Error from Trailhead that I receive is: The validation rule failed to enforce the business logic.
My "logic" was that if accountid in contact is blank there is no account associated ; if not blank check against account zip. A blank accountid is a NOTTRUE result for the first condition and the second condition is null. An accountid is NOT blank, a TRUE and second condition would be testd.
My validation code is: 
AND (
NOT(ISBLANK( AccountId )), 
(MailingPostalCode  <> Account.ShippingPostalCode)
Any help is appreciated. I am used to the more classical (IF( TRUE) AND IF (TRUE)) ELSE....format.
Thank You!