function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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)