1

I need to disable the ability to change a record owner, but only for the Lead object, and only for one Profile. Is this possible?

Alternatively/Additionally, is there a way to remove the "change owner" button from the mobile app?

1

Should they be able to edit the record at all? If not, you could simply remove the edit ability for that object for that one profile.

Otherwise, a validation rule should work well. You can specify the conditions you'd like:

anytime the Owner field changes
AND
it's the profile you're stopping

In actual, correct syntax

AND(
ISCHANGED(OwnerId),
$Profile.Id = '' //insert profile Id here
)

To avoid hard-coding the ID, you can use a couple different options:

  1. Use Profile Name instead
AND(
ISCHANGED(OwnerId),
$Profile.Name = '' //insert profile name here
)
  1. create a custom permission and give it to that profile.
AND(
ISCHANGED(OwnerId),
$Permission.Prevent_Lead_Owner_Edit)
)
  1. create custom metadata that contains the name of the profile and/or ID so you can easily change it across many different validation rules in one location.
AND(
ISCHANGED(OwnerId),
$User.ProfileName = $CustomMetadata.Profile_Mapping__mdt.YourProfileName
)

For the button on the mobile app, you should be able to remove the action from the page layout for that object if the profile has its own layout.

  • 1
    $Profile.Name should work too in lieu of $User.ProfileId, no? (except in a multi-language org) – cropredy Jan 11 at 1:33
  • Definitely, just slipped my mind. Added as well. – Kris Goncalves Jan 11 at 2:49
  • Thank you- good advice – Michael M Jan 14 at 14:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.