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

Lock a field?

Wanted to know if it was possible to lock a field within an object depending on the value of  another field within the same object. For example I have a field called a field called "Year" which is a picklist and there is another field called "Version" which is simpy a number field (Version and Year are not related but in the same object). I want to be able to say if "Year" equals value x make the "Version" field locked. Is this possible and what is the best practice to do this? Any help would be greatly appreciated! Thanks



You can't gray out the field in real time, but you can make a validation rule that throws an error on that field if the year is x and you try to fill it in.