I want to make a field editable for only 3 people. I have given edit access from profiel, The field is read-only on Page layout . is there a way I can make this editable on page layout for these 3 people without creating new page layout and new profile?
1 Answer
There are two ways to achieve this:
Keep the field editable on the Page Layout. Mark the field as
ReadOnly
at Profile Level. Next create aPermission Set
with Edit Access on the desired field. Assign thePermission Set
only to those three users.Else, create a validation rule, which restricts edit for the field for all users except for those three users. Refer below example
AND(ISCHANGED(Field_To_Check__c), $Profile.Name < > "System Administrator", $User.UserName < > "User Name 1", $User.UserName < > "User Name 2", $User.UserName < > "User Name 3")
-
3A validation rule is generally a bad idea, as it gives the user the impression they can edit the field when, in fact, they cannot.– sfdcfoxJun 3, 2021 at 19:19
-
I would completely agree to this, I have just added it as just another workaround/option. But option 1 would be always preferable one. Jun 3, 2021 at 19:24
ReadOnly
at Profile level, then it should bereadonly
for all users for that profile, then mark the field aseditable
only on thePermission Set
. Keep the field editable on the page layout. I haven't tried that, but it should work I suppose.