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
Deepak Kumar 803Deepak Kumar 803 

We can't find a reference to the account 'ShippingPostalCode' field in the validation rule.

Create a validation rule:
Rule Name: Contact_must_be_in_Account_ZIP_Code
Operator: AND (return true if both conditions are true)
Define two error conditions:
The contact is associated with an account id
Hint: Use the ISBLANK and NOT functions.
The contact mailing zip code is different than the account shipping zip code
Hint: Use the API names (MailingPostalCode and ShippingPostalCode) and the <> (Not Equal) operator.
Enter an error message for the validation rule

BELOW IS THE ERROR
We can't find a reference to the account 'ShippingPostalCode' field in the validation rule.
Best Answer chosen by Deepak Kumar 803
AnkaiahAnkaiah (Salesforce Developers) 
Hi Deepak,

Try this rule new palygroud. If still facing issue then contact trailhead support (https://trailhead.salesforce.com/en/help?support=home).

If this helps, Please mark it as best answer.

Thanks!!
 

All Answers

Deepak Kumar 803Deepak Kumar 803
BELOW FORMULA IS NOT HELPING. THIS HAS NO SYNTAX ERRORS

AND(
NOT( ISBLANK(Id)) ,
BillingPostalCode <> ShippingPostalCode )
AnkaiahAnkaiah (Salesforce Developers) 
Hi Deepak,

try with below rule.
AND(
NOT( ISBLANK(AccountId)),
BillingPostalCode <> Account.ShippingPostalCode )

If this helps, Please mark it as best answer.

Thanks!!
Jessica smartJessica smart
Validates that the Phone number is in (999) 999-9999 format. This works by using the REGEX function to check that the number has ten digits in the (999) 999-9999 format. Error Message: US phone numbers should be in this format: (999) 999-9999.   https://www.myadvocateaurora.us/
Deepak Kumar 803Deepak Kumar 803
Hello Ankaiah,
Thank you for your time on this. I tried what has been suggested, however that gives me an error as below: 
Error: Field BillingPostalCode does not exist. Check spelling

I'm trying to Create a validation rule in Contact object, wondering if im doing it right. I tried to apply similar validation rule in Account object too to see if that helps. 

Thank you for trying to help me learn, means a lot..
Deepak Kumar 803Deepak Kumar 803
AND(
NOT( ISBLANK(AccountId)),
MailingPostalCode <> Account.ShippingPostalCode )

Nothing is helping. Not this too :(

now it shows the below error: Challenge not yet complete in Wise Impala Playground
Whoops, looks like there was a problem. Please try again
AnkaiahAnkaiah (Salesforce Developers) 
Hi Deepak,

Try this rule new palygroud. If still facing issue then contact trailhead support (https://trailhead.salesforce.com/en/help?support=home).

If this helps, Please mark it as best answer.

Thanks!!
 
This was selected as the best answer
Deepak Kumar 803Deepak Kumar 803
Yay! New playground helped! You a rockstar!