+ Start a Discussion
KbhaskarKbhaskar 

date validation

hi im on error when
Opportunity Close date should be in future if account type is prospect else if account type is customer (Opportunity Close date should be in future if account type is prospect else if account type is customer it should be past date

IF(ISPICKVAL( Account.Type,"Prospect") && 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)