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
HarryLemonHarryLemon 

Preventing Change of Record Ownership

Not sure how many here this news comes as news to, but it sure came as news to us when we learned recently that, irrespective of how restrictive a user's given Profile may be, they will always still be able to change the record ownership on a record belonging to another user to themselves if they wish!

This was acknowledged by the Salesforce tech support team and management, and the only solution we were given was the use of the following validation constraint:

ISCHANGED(OwnerId)

This, however, has the unfortunate side effect of provoking the exact opposite problem accross all users: that of disabling the ability to modify ownership on any record even if you're the Administrator!

Neither situation being acceptable, I figured if I could adjust the formula to apply itself only to those users belonging to the appropriate ProfileID, then all other profile members would continue to be able to modify the ownership of records belonging to other users, and so attempted the following validation constraint instead:

AND (ISCHANGED( OwnerId ) , $User.ProfileId = "00e30000000evEUAAY")

==> By the way, that winking smilie face is supposed to be just a ')' <==

The ID shown is the ID for our sales team's custom profile, but this code - despite passing the syntax checker - provides no constraints whatsoever, even for members of the listed profile! Essentially, this code takes me back to square one, i.e. - as if I had no validation constraints entered to begin with.

Can someone please help us with this?

It's mind-boggling that a program as sophisticated as Salesforce would ommite such an essential function as the ability to restrict users from changing the ownership of records not belonging to them!

Please help...

Thanks,
Philip
JohanLiljegrenJohanLiljegren
Did you try changing the setting "Transfer Records" on the profiles that shouldn't be allowed to change owner?
I think that's what you're looking for.
HarryLemonHarryLemon
That checkbox has been unchecked for a while and the problem still remains, but thanks for the suggestion! =)


Philip


Message Edited by HarryLemon on 05-23-2008 09:59 AM
NordbergNordberg
Step # 1 you need to check and make sure that your company is set to private.  If you company is set at public then, the restrictions on ownership does not apply.
Step #2 - If you are set to private, you need to set this restriction at the role level.  I am assuming that if you are set a private and a sales rep can change the owner of an opportunity, then they must own the account it is associated to.  At the role level, you can restrict a person from editing opportunities that they do not own, even if they own the account.

Of course, these reccomendations are based on some assumptions based on your challenge.
HarryLemonHarryLemon
Thanks, but I figured out how to do this with the following modification to the validation rule:

AND (ISCHANGED( OwnerId ) , PRIORVALUE( OwnerId ) <> $User.Id , $Profile.Name = 'Account Executive' )

Problem solved! =)

Many, many thanks for all input though,
Philip