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
Bill NealonBill Nealon 

On "Creating Validation Rules" challenge in Admin Intermediate Trailhead. The MailingPostalCode and ShippingPostalCode fields do not exist in my Account and Contact objects. The address fields are not broken out. Did I miss something?

Best Answer chosen by Bill Nealon
Amit Chaudhary 8Amit Chaudhary 8
Hi Bill ,
"MailingPostalCode" and "ShippingPostalCode" are salesforce standard field which will not visible to you on UI but that are there in address field
Please check below post to check Standard field Name

Account:-
https://help.salesforce.com/apex/HTViewHelpDoc?id=account_fields.htm&language=en (https://help.salesforce.com/apex/HTViewHelpDoc?id=account_fields.htm&language=en)

Contact:-
https://help.salesforce.com/apex/HTViewHelpDoc?id=contacts_fields.htm&language=en (https://help.salesforce.com/apex/HTViewHelpDoc?id=contacts_fields.htm&language=en)

Your validation rule on Contact should be like below
AND( 
NOT(ISBLANK(AccountId)), 
MailingPostalCode != Account.ShippingPostalCode 
)

 

All Answers

Amit Chaudhary 8Amit Chaudhary 8
Hi Bill ,
"MailingPostalCode" and "ShippingPostalCode" are salesforce standard field which will not visible to you on UI but that are there in address field
Please check below post to check Standard field Name

Account:-
https://help.salesforce.com/apex/HTViewHelpDoc?id=account_fields.htm&language=en (https://help.salesforce.com/apex/HTViewHelpDoc?id=account_fields.htm&language=en)

Contact:-
https://help.salesforce.com/apex/HTViewHelpDoc?id=contacts_fields.htm&language=en (https://help.salesforce.com/apex/HTViewHelpDoc?id=contacts_fields.htm&language=en)

Your validation rule on Contact should be like below
AND( 
NOT(ISBLANK(AccountId)), 
MailingPostalCode != Account.ShippingPostalCode 
)

 
This was selected as the best answer
Jeff DeLucasJeff DeLucas
what does != mean
Amit Chaudhary 8Amit Chaudhary 8
!= means not equals to
Kyle Burke 7Kyle Burke 7
Amit, how did you learn the use cases for the different operators & functions? I'm trying to teach myself from scratch using Trailhead, but have reached a bit of a knowlede gap in this particular area.