I have a salesforce org where all my user's are system admin . I'am creating a checkbox field on Campaign and want it to be editable only with the Code and not from the detail page .

I have assigned read only permission to the field but still it is editable from the page layout (because I am system admin) . Is there any way I can make it non-editable from the detail page?

  • i think you would need to clone the system administrator profile and then modify the permissions for that field and then assign the new profile to all users. Or maybe you can make it read only from the pagelayout. I havent tried this but i think it should work
    – Prady
    Commented Jun 14, 2016 at 8:41
  • Ok, i think the change from pagelayout doesnt work
    – Prady
    Commented Jun 14, 2016 at 8:47
  • 2
    create a formula field and reference this field. And remove the editable field from page layout. Commented Jun 14, 2016 at 9:00
  • You need to set field level security Commented Jun 14, 2016 at 11:28

2 Answers 2


If you have any accounts like System Admin with 'Edit Read Only fields' permission then it will not be possible to prevent the users with that profile from being able to edit the field.

You can clone the System Adminstrator profile and remove the 'Edit Read Only fields' permission from the System Permissions then move the users to this new profile and that will resolve this problem.

As an aside why are all the users on System Administrator profile? It would be better to give them a more restricted profile with only the permissions that their role needs? Best practice is to grant minimum permissions to the users profiles to perform their activities not to allow all users full administrator permissions.

  • I completely agree on why all users need to be in system admin profile.
    – Prady
    Commented Jun 14, 2016 at 9:11

You can write a validation rule,

$User.Email != '[email protected]'

replace your email with [email protected], in this case only your user can change, otherwise they'll see validation rule email.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .