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
Bharath SamanthulaBharath Samanthula 

How to make a date field required (validation rule)

Im trying to create a validation rule :
Here is the example AND(ISPICKVAL( Status, "ISR-Sale"),ISBLANK( Date_of_Sale__c ) ) 

I have a picklist field for Lead status. If sales user selects ISR - Sale value from Lead status the date of Sale ( custom field ) should be a required field. The above formula shows no error but its not working. Any help would be greatly appreciated
Best Answer chosen by Bharath Samanthula
Leslie  KismartoniLeslie Kismartoni
Alright - checked it with ISBLANK too... That worked.

The last thing I can recommend is that the picklist value matches exactly - I'd copy it directly from the list... (no extra spaces between the hyphen, etc...)

All Answers

Leslie  KismartoniLeslie Kismartoni
I think that you want ISNULL instead of ISBLANK on the date value.
Leslie  KismartoniLeslie Kismartoni
Alright - checked it with ISBLANK too... That worked.

The last thing I can recommend is that the picklist value matches exactly - I'd copy it directly from the list... (no extra spaces between the hyphen, etc...)
This was selected as the best answer
Pankaj_GanwaniPankaj_Ganwani
Hi,

The formula seems to be perfect for me. I think the option value you are trying to compare with will have value like 'ISR - Sale'. These is some spacing between hyphen and words.