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
SBNSBN 

Validation Rule on Account Owner Field

Hi,

 

I need a validation rule where the "Account Owner" Field can  be changed by System Admin and one of the user. All other users should not be allowed to change the Account Owner of the Account Record.

 

I have tried with the below valdiation rule, but its not working.

 

AND(ISCHANGED(OwnerId), $User.Id != '005i0000000DrUE',  $Profile.Name = 'System Administrator' )

 

Anyone have any suggestions??

 

Thanks

 

 

 

 

Best Answer chosen by Admin (Salesforce Developers) 
Rahul_sgRahul_sg

This should work

 

AND( 
ISCHANGED(OwnerId), 
$Profile.Name <> 'System Administrator', 
$User.Id <> '005i0000000DrUE
)

All Answers

Rahul_sgRahul_sg
try this:
AND(
ISCHANGED(OwnerId),
OR(
$Profile.Name <> "System Administrator",
$User.Id <> '005i0000000DrUE'
))
SBNSBN

This is not Working!!

 

Any other suggestions

Rahul_sgRahul_sg

This should work

 

AND( 
ISCHANGED(OwnerId), 
$Profile.Name <> 'System Administrator', 
$User.Id <> '005i0000000DrUE
)

This was selected as the best answer
SBNSBN

Thank you .Its Working!!