0

I have 2 objects

  1. Timecard pse__Timecard_Header__c and

  2. Period c2g__codaPeriod__c.

The relationship between these two objects is there is a lookup field PD__c which is related to Period.

There is a picklist field Status pse__Status__c on Timecard object with following values:

Saved

Submitted

Approved

Rejected

There is another checkbox field Closed c2g__Closed__c on Period Object. If this checkbox is checked then I want the status not to be equal to Rejected.

This is what I came up with but it is not working.

AND(Period__r.c2g__Closed__c == TRUE,
ISPICKVAL(pse__Status__c , "Rejected"))

2 Answers 2

1

The formula should be:

PD__r.c2g_Closed__c && ISPICKVAL(pse_Status__c, "Rejected")

There is no lookup field Period__c in your object, it's called PD__c, which is PD__r when used in a reference in a formula.

0

You just need one "equal to" symbol

AND(Period__r.c2g__Closed__c = TRUE,
ISPICKVAL(pse__Status__c , "Rejected"))
4
  • Still, it fails.
    – LazyBones
    Dec 3, 2014 at 19:27
  • Which object are you creating the record on? Are you specifying the lookup value. Dec 3, 2014 at 19:58
  • I am creating the validation rule on Timecard object. Specifying the lookup value PD__c ? nope.
    – LazyBones
    Dec 3, 2014 at 20:06
  • Isn't the lookup field called PD__c? In that case couldn't you do PD__r.c2g__Closed__c && ISPICKVAL(pse__Status__c , 'Rejected')
    – Nick C
    Feb 15, 2015 at 12:47

You must log in to answer this question.

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