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
David Kerr 5David Kerr 5 

Custom Field won't lock even though I mark it as Read-Only in the page layout

I have set my Attachment field check box on the opportunity object to be 'read-only' in the page layout: User-added image


However, when I go to one of my opportunities, the field can still be edited: User-added image


Any idea why this might be happening / a quick fix?
Best Answer chosen by David Kerr 5
Rahul.MishraRahul.Mishra
Hi David,

Field will be read only for other profiles, if it is not read only for you then the reason is you are the system admin . As per the standard salesforce, on system admin profile, by default 'Edit Read Only Fields' checkbox marked as true, i..e..we have a permission to edit the fields though it is read only. Solution I see is, clone the admin profile and uncheck the check box and use it.

Thanks,
Rahul

Please mark my answer as best if it does solves your problem
 

All Answers

Rahul.MishraRahul.Mishra
Hi David,

Field will be read only for other profiles, if it is not read only for you then the reason is you are the system admin . As per the standard salesforce, on system admin profile, by default 'Edit Read Only Fields' checkbox marked as true, i..e..we have a permission to edit the fields though it is read only. Solution I see is, clone the admin profile and uncheck the check box and use it.

Thanks,
Rahul

Please mark my answer as best if it does solves your problem
 
This was selected as the best answer
David Kerr 5David Kerr 5
Ah that makes sense.  Thanks so much!