1

I have a new Salesforce org in Lightning that I am setting up. My requirements (I have built these) are as follows:

5 Profiles, some with CRE some with CRED on all objects - Cloned Standard User in creating profiles

OWD Private/Read

1 of the profiles with CRED is allowed to change owners (Transfer Record permission) The other 4 profiles should not be allowed

Change Owner button has been removed from the page layout

My Question is:

Do I have to use validation rules to prevent the 4 profiles from changing the owner? Is there any other way? I cannot be sure that the profiles I have set up will be the only profiles in a month when, at which time I will not be around.

Any help is greatly appriciated

1

Do I have to use validation rules to prevent the 4 profiles from changing the owner? Is there any other way? I cannot be sure that the profiles I have set up will be the only profiles in a month when, at which time I will not be around.

Validation rules would clearly be the way to go if you only want the one profile with Transfer Record permissions (and presumably any Admin) to be able to change ownership of records.

However, since as you say you won't be around, the Admin who's there in your place will be able to do any number of things. Not only can they create new profiles and edit the other four profiles, they'll also be able to deactivate any validation rules you create that preclude the users from changing ownership of records.

If preventing a change of ownership is especially important to the application, you'll want to make certain you document it and train users and management so they understand why this important. Assuming the user who creates the record is the owner that you don't want to change, you'll then want to create your validation rule using something like this:

AND(NOT( ISNEW() ), 
ISCHANGED(Owner),OR($Profile.Name <> "System Administrator",$Profile.Name <> 
"Custom Profile with Transfer Record Perms")) 
1

If an administrator wants to restrict his users from changing the ownership of a record they can use a validation rule on this object.

The rule would be $User.Id != "00520000001GfwQ" && ISCHANGED( OwnerId )

The ID stands for the user that is able to change the ownership. To get this ID, go to the user profile and copy the ID from the URL address bar of the browser. This person is then the only one in the company who got the permission to change the ownership of this record.

You Can do this for profiles also.

1

I think trigger is best option for this requirement. In trigger you can check profile before changing the ownership and restrict the user to do so.

  1. Get new/updated owner profile ID
  2. If it's belong to the profile for which you don't have to restrict, you can restrict it using .addError()

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.