Salesforce Validation: Lock Field from Changing Value

This blog is to show you how to prevent the user from changing a field value once it has been populated. For example, there is a date field in Opportunity and it should be locked once a date is populated.


A simple way is to use the validation. You can use the ISCHANGED and PRIORVALUE method in your formula.


Sample Formula:

AND( ISCHANGED( Registration_Date__c ), !ISBLANK(PRIORVALUE(Registration_Date__c)))