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
Jacques CONANJacques CONAN 

Create Validation Rules

Hello,
I am failing to pass the challenge in Admin Intermediate > Formulas & Validations > Create Validation Rules.
I get the following error:
"Challenge not yet complete... here's what's wrong:
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: FIELD_CUSTOM_VALIDATION_EXCEPTION, Contact must be in Account ZIP Code: []"
Here is the setting for my validation formula:
User-added image
Can someone help me?
Thanks in advance.
Jacques
 
Best Answer chosen by Jacques CONAN
Waqar Hussain SFWaqar Hussain SF
try below vlaidation code
AND(
  NOT( ISBLANK( AccountId ) ),
  MailingPostalCode <> Account.ShippingPostalCode
)

 

All Answers

Waqar Hussain SFWaqar Hussain SF
try below vlaidation code
AND(
  NOT( ISBLANK( AccountId ) ),
  MailingPostalCode <> Account.ShippingPostalCode
)

 
This was selected as the best answer
Jacques CONANJacques CONAN
Thanks Wagar!
Waqar Hussain SFWaqar Hussain SF
If your problem is solved, please mark answer as Best answer so it is removed from the unanswered queue.

Thanks