-3

enter image description here

It keeps saying that MailingPostalCode doesn't exist. It also says that Account.Id doesn't exist, as well as <> and Account. Someone please help!!!

3
  • Hi @Nebula, could you please add what is the requirement? And can you double-check check whether MailingPostalCode is exist or not? Commented Apr 16, 2023 at 4:25
  • 'MailingPostalCode' field exists on contact not on account. You can create above validation on contact AND( NOT(ISBLANK(AccountId)), MailingPostalCode != Account.ShippingPostalCode )
    – Vinay
    Commented Apr 16, 2023 at 4:30
  • 1
    What is the object you are building this rule on? Commented Apr 17, 2023 at 16:40

1 Answer 1

0

The reason you are getting this error is because field MailingPostalCode does not exist on Account object

You need to create the validation rule on Contact Object.

AND( 
NOT( ISBLANK( AccountId ) ), 
MailingPostalCode <> Account.ShippingPostalCode 
)

Check Fields available on contact Object

https://developer.salesforce.com/docs/atlas.en-us.sfFieldRef.meta/sfFieldRef/salesforce_field_reference_Contact.htm

Check Fields available on Account Object

https://developer.salesforce.com/docs/atlas.en-us.sfFieldRef.meta/sfFieldRef/salesforce_field_reference_Account.htm

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .