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
cbrocbro 

Validation Rule Help - Cannot change date once a date is entered into a date field

I don't want someone to be able to change the date End_Date__c once a date has been entered

 

With this code it won't even allow anyone to enter a date at all, even if there was no prior date:

 

AND(ischanged( End_Date__c ))

 

How do I allow someone to enter a date, but then not change that date?

This seems to be the beginning of the the code, but I'm missing something:

 

IF(End_Date__c <> "")    AND(ischanged( End_Date__c ))

 

Thanks,

Best Answer chosen by Admin (Salesforce Developers) 
m.elmoussaouim.elmoussaoui
Try this :

ISCHANGED(End_Date__c) && TEXT(PRIORVALUE(End_Date__c)) != ''

All Answers

m.elmoussaouim.elmoussaoui
Try this :

ISCHANGED(End_Date__c) && TEXT(PRIORVALUE(End_Date__c)) != ''
This was selected as the best answer
cbrocbro

Thanks very much!  Worked perfectly~

 

Chris