i think ns misunderstood validation rules, so ns answered the following difficulty creating a validation ascendancy that only applies if the insertion is different for what i write in the rule:

AND(ISBLANK( Account.Id ),OR( MailingPostalCode = Account.ShippingPostalCode ))I mean, if the insertion/update is correct, then do it, else display screen error message.

You are watching: Create a validation rule to check that a contact is in the zip code of its account.

The challenge has succeeded.

My question is, am i wrong or i should write in the validation preeminence the conditions where should"nt it is in accepted?

Here is the challenge


validation-rule trailhead developer
re-publishing
boost this concern
follow
inquiry Mar 1 "19 at 10:51
*

Héctor Cervera PanellaHéctor Cervera Panella
8911 silver badge88 bronze badges
add a comment |

2 answer 2


active earliest Votes
1
According come the challenge

A contact with a MailingPostalCode that has an account and also does not enhance the connected Account ShippingPostalCode need to return through a validation error and not it is in saved.

The validation rule should ONLY use to contact records through an associated account. Contact records with no associated parent account can be included with any kind of MailingPostalCode value. (Hint: you can use the ISBLANK duty for this check)

the correct technique will be together follows:

AND(NOT(ISBLANK(Account.Id)) , NOT(ISBLANK(MailingPostalCode)) , NOT(ISBLANK(Account.ShippingPostalCode)), (MailingPostalCode != Account.ShippingPostalCode))Since, you require to examine all the empty entries for Account"s Id, ShippingPostalCode and Contact"s MailingPostalCode and also then validate if Contact"s MailingPostalCode != Account.ShippingPostalCode


re-superstructure
improve this prize
follow
reply Mar 1 "19 in ~ 11:04
*

Santanu BoralSantanu Boral
35k88 yellow badges3737 silver badges6868 bronze badges
include a comment |
1
The exactly validation rule for the mentioned an obstacle is

AND( NOT(ISBLANK( AccountId )), MailingPostalCode Account.ShippingPostalCode)Validation dominance should examine for the problems that should"nt be accepted.


re-superstructure
boost this price
monitor
reply Mar 1 "19 in ~ 10:59
*

Junaid p KhaderJunaid p Khader
1,36777 silver badges1616 bronze badges
include a comment |

your Answer


Thanks because that contributing response to trident-gaming.net stack Exchange!

Please be certain to answer the question. Carry out details and also share your research!

But avoid

Asking because that help, clarification, or responding to other answers.Making statements based on opinion; ago them increase with recommendations or an individual experience.

To learn more, see our tips on writing good answers.

See more: Jelly Roll Morton Maple Leaf Rag Time And Jazz Traditions, The Creativity Of Jelly Roll Morton


Draft saved
Draft discarded

Sign up or log in in


authorize up making use of Google
authorize up making use of Facebook
sign up using Email and Password
submit

Post together a guest


surname
email Required, yet never shown


Post as a guest


name
email

Required, yet never shown


article Your answer Discard

By clicking “Post your Answer”, friend agree come our regards to service, privacy policy and cookie plan


Not the answer you're spring for? Browse various other questions tagged validation-rule trailhead developer or ask your own question.


The Overflow Blog
Featured top top Meta
related
2
Validation preeminence on Account
0
opportunity Validation ascendancy Will no Fire
0
create a validation top top zip password
0
Workaround to prevent hardcoding the if condition parameters in apex create
1
create Validation dominance Error blog post
0
Account Validation dominion
0
validation rule concern its not working as intended
hot Network inquiries more hot questions

concern feed
subscribe to RSS
concern feed To subscribe to this RSS feed, copy and also paste this URL into your RSS reader.


*

trident-gaming.net
company
stack Exchange Network
site architecture / logo © 2021 ridge Exchange Inc; user contributions license is granted under cc by-sa. Rev2021.10.11.40423


trident-gaming.net is a registered trademark of trident-gaming.net.com, Inc.
trident-gaming.net ridge Exchange works best with JavaScript permitted
*

your privacy

By click “Accept every cookies”, girlfriend agree stack Exchange have the right to store cookies on your device and disclose details in accordance with our Cookie Policy.