• Erin Jodat
  • NEWBIE
  • 5 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
Arg, I've read other posts about this but it will not work for me! The validation rule in 'Formulas & Validations' is: 
To complete this challenge, add a validation rule which will block the insertion of a contact if the contact is related to an account and has a mailing postal code (which has the API Name MailingPostalCode) different from the account's shipping postal code (which has the API Name ShippingPostalCode).Name the validation rule 'Contact must be in Account ZIP Code'.
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 inserted.
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 ISBLANK function for this check)

My rule is: 
AND(
NOT( ISBLANK( AccountId )),
Contact.MailingPostalCode <>   Account.ShippingPostalCode
)

But it comes back with 'The validation rule failed to enforce the business logic.'

Not sure what I'm missing.....
Arg, I've read other posts about this but it will not work for me! The validation rule in 'Formulas & Validations' is: 
To complete this challenge, add a validation rule which will block the insertion of a contact if the contact is related to an account and has a mailing postal code (which has the API Name MailingPostalCode) different from the account's shipping postal code (which has the API Name ShippingPostalCode).Name the validation rule 'Contact must be in Account ZIP Code'.
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 inserted.
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 ISBLANK function for this check)

My rule is: 
AND(
NOT( ISBLANK( AccountId )),
Contact.MailingPostalCode <>   Account.ShippingPostalCode
)

But it comes back with 'The validation rule failed to enforce the business logic.'

Not sure what I'm missing.....