I have two fields.

  1. Closed (c2g__Closed__c) --> Checkbox
  2. Status (pse__Status__c) --> Picklist

So if checkbox is checked, then the status should not be equal to Rejected. Here is what I wrote but it is giving error.

AND(Period__r.c2g__Closed__c = TRUE) OR(pse__Status__c <> "Rejected")

  • The syntax you're using for the AND and OR statements is likely why you're getting an error. Remember, the AND statement syntax looks like this: AND(logical1,logical2,...) and the OR statement syntax looks like this: OR(logical1,logical2,...) So your equation is not completing the validation the way you are intending. The below posted formula is appropriate, assessing if the first and second logical expressions are true, and if so, throw an error.
    – HomerJ
    Commented Dec 2, 2014 at 15:37

1 Answer 1


If I understand your validation rule, which is if Period__r.c2g__Closed__c is TRUE and pse__Status__c is "Rejected" you would like an error to appear, I believe this is the validation rule you would create for that:

AND(Period__r.c2g_Closed__c = TRUE, ISPICKVAL(pse_Status___c, "Rejected"))

If you post the error message exactly, I can give more targeted help.

This code was not compiled or tested, however should give you the gist of what you are looking for.

  • yes this is what I want. So true is right or I should do == ?
    – LazyBones
    Commented Dec 2, 2014 at 15:34
  • 2
    Reference From cheat cheat and from some quick testing it looks as though either using a single equal sign or a double equal sign will work. Period__r.c2g_Closed__c = TRUE will run the same way as Period__r.c2g_Closed__c == TRUE Commented Dec 2, 2014 at 15:36
  • 2
    Which is the same as Period__r.c2g__Closed__c. Checkboxes automatically count as a Boolean value.
    – sfdcfox
    Commented Dec 2, 2014 at 16:12

You must log in to answer this question.

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