1
IF
(
ISNEW() 
Garage__r.Total_inventory__c < Unit_Solds__c,
IF (Unit_Solds__c< PRIORVALUE(Unit_Solds__c),false,
Garage__r.Total_inventory__c<(Unit_Solds__c-PRIORVALUE(Unit_Solds__c))))

2 Answers 2

2

You forgot a comma after ISNEW()

IF
(
  ISNEW(), //Eval
    Garage__r.Total_inventory__c < Unit_Solds__c, //True Part
    IF ( //False Part
     Unit_Solds__c < PRIORVALUE(Unit_Solds__c), //eval
      false, //true part
      Garage__r.Total_inventory__c < (Unit_Solds__c-PRIORVALUE(Unit_Solds__c)) //false part
    )
)
0

False part of the first IF is missing.

enter image description here

I have pointed out issues as yellow highlights.

3
  • ISNEW DOES NOT take any parameters. It solely evaluates to true if the record is being inserted
    – Eric
    Commented Dec 27, 2015 at 20:37
  • Ohh..that was a bummer..thanks for pointing out @Eric. Updated solution accordingly. Thanks. Commented Dec 28, 2015 at 4:18
  • It is still incorrect as you are making the same mistake as the OP
    – Eric
    Commented Dec 28, 2015 at 5:13

You must log in to answer this question.

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