You need to sign in to do that
Don't have an account?

validation rule trailhead issue
Anyone Seen this on the validation rule trailhead? - 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: []
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: []
Check all the active validation rules and triggers to trace down the error throwing statement / rule.
Thanks,
Yogesh
and (not(isblank( MailingPostalCode )),
not (isblank(Account.Id )),
MailingPostalCode<>Account.ShippingPostalCode
)
Not sure where I'm going wrong.
Hi Joe.
First, the first line ("not(isblank( MailingPostalCode )") can make an issue; what if the account's postal code field is empty, and so does the contact's mailing field? in this case- this expression will return 'false' instead of 'true'.
Second, the <> operator. Try to use = operator.
It should not be that way, I know, and I sent feedback for this matter.
Try to use the next rule (it worked for me):
AND(
NOT(ISBLANK( Account.Name )),
MailingPostalCode__c = Account.ShippingPostalCode__c
)
Account.ShippingPostalCode <> MailingPostalCode
I did the formula:
NOT(ISBLANK( Account.Id )) && MailingPostalCode__c = Account.ShippingPostalCode__c
and the formula worked, but the exercise was not validated properly. I enter with the AND and it was validated
thanks
&&
( MailingPostalCode <> Account.ShippingPostalCode )
and(
not(isblank(AccountId)),
MailingPostalCode<>Account.ShippingPostalCode)
and it says it was not correct.
i repeat the trails with a different trailhead account. i did pass the challenge with my old account earlier this year but now, with the same rule in the same org, i keep getting the same error over and over again. is someone able to say if this challenge is somehow blocked by another trail? i completed a lot of trails in my DE org so it might be possible that there is a conflict, but i have no idea where to start searching for it.
AND(NOT(ISBLANK(Account.Name)), MailingPostalCode <> Account.PostalCde)
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: []
Then create a new Dev Org and try again. I just did this and passed with:
AND(
NOT(ISBLANK(Account.Id)),
MailingPostalCode != Account.ShippingPostalCode
)
I just passed the same challenge with
AND(
NOT(ISBLANK(Account.Name)),
MailingPostalCode <> Account.ShippingPostalCode
)
AND(
NOT(ISBLANK(Account.Name)),
MailingPostalCode <> Account.ShippingPostalCode
)
Ok, I agree, those formulas work for this challenge.
But if we test the situation where the contact has no account linked. If he write a postal code, I think it won't work because he won't complete the first condition "NOT(ISBLANK(Account.Name))".
Wouldn't that be more appropriate to write this formula instead to include this case ?
OR(
AND(
NOT(ISBLANK(Account.Name)), //If the contact is linked with an account...
MailingPostalCode <> Account.ShippingPostalCode//... he has to have a different postal code
),
ISBLANK(Account.Name)//but the case of contact without account is OK too
)
Am I right ?
If you find your Solution then mark this as the best answer.
Thank you!
Regards
Suraj Tripathi