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
HNT_NeoHNT_Neo 

Read Only Field with out ability to update later

I'd like to modify a validation rule that would prevent a user from changing or deleting the contents of a field after data has been entered.

This formulat allows you to do just that but, if I create a record, with no data in the field, save it but return later to enter data into the field, the record errros out, not allowing me to save the record.  

Does anyone know how I could modify this to allow users to create a record and if the field is left blank on save, can enter a value later? But if a user enters data into the field on create new, they should not be able to modify the field later. If they try to modify the field data or delete the field data and try to save it, it should error out. 

Here is my number field type VR:
 
IF(ISNULL( PRIORVALUE( Quote_Number_P4__c )),FALSE,ISCHANGED( Quote_Number_P4__c ) )



Thanks,
Nick
 
Best Answer chosen by HNT_Neo
HARSHIL U PARIKHHARSHIL U PARIKH
Try using the following formula. I have tested in my org and it is working for me.

User-added image

Hope this helps and if its solves the query then plese mark it best answer!

Sorry I have to attach it a Image since it is not letting me do the code.

All Answers

brahmaji tammanabrahmaji tammana
To skip the validation rule check in record creation, add below 

NOT(ISNEW())

Thanks
Brahma
HARSHIL U PARIKHHARSHIL U PARIKH
Try using the following formula. I have tested in my org and it is working for me.

User-added image

Hope this helps and if its solves the query then plese mark it best answer!

Sorry I have to attach it a Image since it is not letting me do the code.
This was selected as the best answer
HNT_NeoHNT_Neo
Thank you Govind!