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
Suman DeepSuman Deep 

Validation to Lock Field

Hi All
Was trying to write a validation rule to push back the field value if field is edited to previous value, and if its blank its editable and the 1st value entered in the field stayes forever.
How can i add if its blank then let it save the value.

NOT(ISNULL(PRIORVALUE(FIElD Name)))
Any help is greatly appreciated.
Thanks
Best Answer chosen by Suman Deep
kevin lamkevin lam
AND(NOT(ISNEW()),
          ISCHANGED(field name),
          NOT(ISBLANK(PRIORVALUE(field name))))

All Answers

kevin lamkevin lam
AND(NOT(ISNEW()),
          ISCHANGED(field name),
          NOT(ISBLANK(PRIORVALUE(field name))))
This was selected as the best answer
Suman DeepSuman Deep
Hi Kevin Lam
Thanks a lot for the reply. With this i am getting an error . Because i have a master picklist and dependent picklist to this.I need to lock both of them on their first value or push to prior value.
Any idea how i can format this for them?
Thanks a lot for the help in advance.
Thanks
Suman
sumandeep.m@gmail.com
Suman DeepSuman Deep

Hi Kevin
Never Mind. There was a default value to that picklist.So it was giving an error.
Thanks a lot for that answer though.

Have a great day.

Suman