Loading

Restrict Users' ability to change ownership of a record

Fecha de publicación: Jun 6, 2026
Descripción

Salesforce administrators may need to restrict users from changing the ownership of records on specific objects. This is useful in organizations where record ownership is controlled by assignment rules or business processes and should not be manually overridden. This article explains how to create a validation rule that prevents users from changing the OwnerId field on a record, while allowing a designated user (such as an admin) to still make ownership changes.

Solución

If you want to restrict users from changing the ownership of a record, you can define a validation rule for the object.  

Salesforce Classic

1. Click on Setup.
2. Select the object you wanted to create the Validation Rule.
 

For Standard objects: Expand “Customize”, under it expand the object you wanted to create the validation rule by clicking the arrow before its name and click on “Validation Rules”.
 
For Custom objects: Expand “Create”, under it click “Objects” and click the object you wanted to create the validation rule. Scroll down to the “Validation Rule” section.

 
3. Click New.
4. Define the Rule Name.
5. Select Active.
6. Under the “Error Condition Formula” section, enter:

 $User.Id <> "00520000001GfwQ" && ISCHANGED( OwnerId )

7. Fill up the Error Message. 
8. Select the location you prefer to see the Error Message.
9. Click Save.
 

Lightning Experience

1. Click the Gear Icon on the upper right corner.
2. Click Setup.
3. Click Object Manager.
4. Search for the object. 
5. Click the object name.
6. On your left, click on Validation Rules.
7. Click the “New” button on the upper right. 
8. Define the Rule Name.
9. Select Active.
10. Under the “Error Condition Formula” section, enter: 

$User.Id <> "00520000001GfwQ" && ISCHANGED( OwnerId )

11. Fill up the Error Message.
12. Select the location you prefer to see the Error Message.
13. Click Save.

 
Note: In the formula $User.Id <> "00520000001GfwQ" && ISCHANGED(OwnerId), replace 00520000001GfwQ with the Salesforce User ID of the user who should be allowed to change ownership. To find a User ID, refer to the 'Locate a Salesforce User ID' article.

Número del artículo de conocimiento

000385395

 
Cargando
Salesforce Help | Article