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
Adeline Didier 7Adeline Didier 7 

Create Validation Rule - challenge validation fails

Hello,

I'm going through the Formulas & Validations module and I'm stuck with the challenge on the "Creating Validation Rules".
I'm getting this error message:

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 Code of the account: [MailingPostalCode]
 
Ashish_PandeyAshish_Pandey
Hello,
Checking "NOT ISBLANK" for "AccountId" is enough for this challenge.
AND(
  NOT( ISBLANK( AccountId ) ),
  MailingPostalCode <> Account.ShippingPostalCode
)

Regards,
Ashish

 
Adeline Didier 7Adeline Didier 7
Thanks, it worked! I was using the Account Name instead of iD.