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
ilaiilai 

set a field to readonly immediately when a checkbox is checked on Edit page

Hi,

 

Would like to ask how to set a field to readonly immediately when a checkbox is checked on standard object Edit page.

 

Can this be done by using VisualForce?

 

Thanks.

Best Answer chosen by Admin (Salesforce Developers) 
dev_forcedev_force

Unfortuantely dynamically changing a field to read-only on a standard salesforce edit page is not possible.

 

You could use visualforce/javascript, but by doing so you'll have to re-create the edit page using visualforce.