Validation Rule to make a field - Read Only

Make a field(sampleField__c) Read Only or changing of the field(sampleField__c) value not allowed if the field(sampleField__c) has a value provided earlier


By pass the above for System Admin that is User's with system admin profile should be able to edit.


Here the object API name is Contact



Validation Rule on Contact object -


AND(

  PRIORVALUE(sampleField__c) <> '',

  ISCHANGED(sampleField__c) ,

  $Profile.Name <> 'System Administrator'

)



Error Message : You are not allowed to update this field.


Visual : https://www.youtube.com/watch?v=KR7uMoeXs3w

Comments