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
SBforVSBforV 

ability to make a field Read-Only as soon as a value is saved within the field

Hello-

What would be the easiest way to have a field, that is initially Read-Write to end users UNTIL they enter data into it?

It would be a date field.

We essentially want to lock the field down, from further edits, once data is entered.

 

Any suggestions are very welcome.

 

Thank you,

SB

aalbertaalbert

Using a field update, you could switch Record Types after the field is populated and the associated page layout has that field set to read-only.

 

Or you write an Apex trigger to prevent that field from being changed once its populated - but this won't prevent the data from being entered in the UI.