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
Sophia Krich-Brinton 16Sophia Krich-Brinton 16 

Can't figure out syntax for formula

Hi Everyone, 
I'm trying to create a rule that requires that shipping/mailing postal codes must match for all contacts with accounts. I'm getting syntax errors that don't make sense (like 'found extra AND' or 'found extra NOT'). Can anyone tell me what I'm doing wrong here? 

AND (
NOT(ISBLANK(AccountNumber))
NOT(Account.ShippingPostalCode = MailingPostalCode)
)
Chandra@AtlantaChandra@Atlanta
Sophia,

see if this works

NOT(ShippingPostalCode !=  BillingPostalCode)
 && NOT(ISBLANK( AccountNumber ))

"Appreciate your feedback"
Sophia Krich-BrintonSophia Krich-Brinton
That worked, with a few field modifications (copied below). Thank you!

AND (
NOT(Account.ShippingPostalCode !=  MailingPostalCode)
 && NOT(ISBLANK(  Account_Number__c  ))
)
 
Sophia Krich-BrintonSophia Krich-Brinton
For future reference, this also ended up working:

AND ( 
NOT(ISBLANK( AccountId )), 
(Account.ShippingPostalCode <> MailingPostalCode) 
)
Chandra@AtlantaChandra@Atlanta
Great!!!