+ Start a Discussion
KbhaskarKbhaskar 

validation rule on date error

hi, below is validation rule on date but still i do have err
Error: Syntax error. Extra ','
IF(ISPICKVAL(Account.Type,"Prospect") && DAY(CloseDate) < Today()), true,
IF(ISPICKVAL(Account.Type,"Customer - Direct") && DAY(CloseDate) > Today()), true,
IF(ISPICKVAL(Account.Type,"Customer - Channel") && DAY(CloseDate) > Today()), true,
IF(ISPICKVAL(Account.Type,"Customer") && DAY(CloseDate) > Today(),true, false))
Prasun BanerjiPrasun Banerji

Hello Bhaskar,

You may try with OR format as below. Please let me know if you get any issue with this.

IF(
OR(
ISPICKVAL(Account.Type,"Prospect") && DAY(CloseDate) < Today(),
ISPICKVAL(Account.Type,"Customer - Direct") && DAY(CloseDate) > Today(),
ISPICKVAL(Account.Type,"Customer - Channel") && DAY(CloseDate) > Today(),
ISPICKVAL(Account.Type,"Customer") && DAY(CloseDate) > Today()
),true,false)