function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
farah sheriffarah sherif 

validation rule help (trialhead module)

need help with this trialhead modile

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 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 ISBLANK function for this check)


I wrote this but it's incorrect
 MailingPostalCode !=  Account.ShippingPostalCode 
Best Answer chosen by farah sherif
Deepali KulshresthaDeepali Kulshrestha
Hi  farah,

Please refer to these links it will be helpul to you:
https://success.salesforce.com/answers?id=90630000000463gAAA
https://developer.salesforce.com/forums/?id=906F0000000Ar9hIAC    
https://www.youtube.com/watch?v=PUByNV8NAPY
https://www.reddit.com/r/salesforce/comments/7abs1a/can_someone_please_help_me_with_this_validation/

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.

Thanks and Regards,
Deepali Kulshrestha