I have a requirement to give access to few users changes leads ownership to there names.
So, I need a validation rule if they try to change ownership from other users. But it's not giving any error if they try to change ownership.
AND(
ISCHANGED( OwnerId ),
$User.Type__c='Team X',
CASE(
PRIORVALUE(OwnerId),
"0056F000008CKJ0", 1,
"00G0k000001WzJJ", 1,
0) = 1,
OwnerId <> $User.Id
)
Please let me know where i missed it.