Print this page

Does validation fire on ownership change?

Knowledge Article Number 000005079
Description

Does a validation rules fire on ownership change?

Resolution

Single ownership change - Validation rules will fire. 
For example going to an account record, clicking on [change] next to the owner field.  You will then be presented the change ownership page.  When you attempt to save the ownership change, it will evaluate all validation rules on the account object.  The validation message will appear on the change ownership screen below the lookup to user box on save. 

If there is a billing address validation rule that city cannot be null and the record was created before the validation rule, ownership change will evaluate that rule and not allow you to change the ownership of the record until the record meets all validation criteria.

This also includes changes made via the data loader or updates via the API, since changes are made at a single record level.

Mass ownership change - Validation rules will NOT fire.
If you are using the mass transfer records from Setup | Administration Setup | Data Management | Mass Transfer Records, validation rules will not fire.

In summary:
Validation rules run when changing a record owner in these places:

- through the API (for example, when using Data Loader; this behavior is unchanged since Summer '07)
- single owner change (using the Change Owner link on a detail page; this is new behavior as of Winter '08)

 Validation rules do not run when changing record owners in these places:

- Mass Transfer Records
- Mass change owner (using the Change Owner list button)
- Accept button on Queue List Views
Note: when changing ownership on Accounts, Opportunity Validation Rules are also ignored when selecting to transfer Closed Opportunities and Opportunities not owned by the existing Account Owner.


What if I don't want the rules to fire for all users? 
What if my admins are the ones doing the owner change, and they do not have the data needed to pass the validation rule?  How can I allow them to make the change?
If there are some users who do not have to comply with the validation rules, then write the validation rule in a way that excludes them, using the $Profile.Name global variable.  For example, if the billing address is usually required, but not for the standard admin profile, then the validation formula would be:

 

AND ($Profile.Name <> "System Administrator",
OR(BillingStreet="",BillingCity="",BillingState="",BillingCountry = "",BillingPostalCode=''))





promote demote