0

Why does this validation rule give me syntax errors?

BUSINESS REQUIREMENT:

IF "agreement type" picklist field EQUALS "apple" OR "orange" AND "Related Member" lookup field IS empty THEN throw validation rule error message.

VALIDATION RULE:

AND(
OR(
ISPICKVAL(Agreement_Type__c, “apple”),
ISPICKVAL(Agreement_Type__c, “orange”)
),
ISBLANK(Related_Member__c)
)
0

The rule looks ok to me except for the quotes you have used around the values apple & orange..

I took the exact one you had in my dev org and it complained only on the quotes.. change it to single quote like belwo and it should work..

AND(
OR(
ISPICKVAL(Agreement_Type__c, 'apple'),
ISPICKVAL(Agreement_Type__c, 'orange')
),
ISBLANK(Related_Member__c)
)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.