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
Aslam_Kamal_86Aslam_Kamal_86 

Access rights for standard owner field on any object?

Can we edit the access rights for the standard owner field on an object. For example, for a particular profile, we have given edit access to the Account Object. Is it possible to revoke the edit permission for the Owner field alone for this profile on the Account Object. I have tried in Set/View Field  Level Accessibility. It does not work. Please share your views.

werewolfwerewolf

You could do that with a validation rule, just combine ISCHANGED(OwnerId) with one or more checks on $Profile or $Role.

Aslam_Kamal_86Aslam_Kamal_86

Hi werewolf,

 

Thanks for your response. I would like to rephrase my question.

 

I wish to remove the [change] link  next to the owner field. Which means the user should NOT be able to change the owner, but should be able to change the other fields. I tried to remove the owner field itself from the layout, and put in a formula field thaty would copy the record owner's name. But due to another nagging constraint, the owner's name is not available in the formula.

 

So I see two options, either find a way to remove the [change] link OR put in a formula field that copies the owner's name. I would like to keep class,trigger,VF as a LAST option.

 

Please could you point me in the right direction...

werewolfwerewolf

You know I think you can just go to the page layout, mouse over the owner field, press the wrench icon, and check on Read Only.  That should do what you're looking for.

werewolfwerewolf

Hmm I just tried that and it didn't seem to work as I'd expected.  Maybe you just can't remove the change link.

 

In any case the approach I suggested above is a validation rule, not an Apex trigger.