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
KNKKNK 

Validation Rule on Text Data type.

Hi Team,

 

I want to create a validation rule on text data type Name. Name contains the values of years.

 

Only current and next year values i need to create, for that i was using below validation, but it is showing Error Missign ')'

 

OR(
"TEXT"("Name") == YEAR(TODAY()),
"TEXT"("Name") == (YEAR(TODAY()) + 1)
)

 

can any one help me on the same

Best Answer chosen by Admin (Salesforce Developers) 
NasipuriNasipuri

You are using wrong Formula and logic

 

The rule will be something line below

 

------------------------------------------------------------------------

OR(
VALUE(Name) <> YEAR(TODAY()),
VALUE(Name) <> (YEAR(TODAY()) + 1)
)

--------------------------------------------------------------------

 

Regards,

Dinesh Nasipuri

Dinesh.Nasipuri@gmail.com