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
sra gowthamsra gowtham 

Create a validation rule to check that a contact is in the zip code of its account(means contact zipcode and Account zipcode should be same)

I want This validation Code and Trigger
Steven NsubugaSteven Nsubuga
There are 2 zip code fields on the Account object, Account.BillingPostalCode and Account.ShippingPostalCode.
Account.BillingPostalCode !=  MailingPostalCode

 
sra gowthamsra gowtham
Hai steven,
plzz give me explanation
Steven NsubugaSteven Nsubuga
That validation rule prevents the creation of a contact whose zip code is different from the billing zip code of its account
Jeff FeroceJeff Feroce
I have no idea why this worked, but it did indeed work: ShippingPostalCode = BillingPostalCode

When I originally tried to use MailingPostalCode, the syntax checker told me that MailingPostalCode did not exist(?).