Show

sorted by

Need help with a Lead validation rule, allow users to change the owner on Leads they own, but only Leads they own

Hi everyone, I need help doing the following rule:

- All user profiles can reassign a Lead that THEY own, to anyone else.- If they do NOT own it, then they can view it, but they cannot edit it, change it, change the owner etc, UNLESS they are a System Administrator profile.

I need this as we have Lead Generation reps that create Leads and assign them, so they need to change the owner from themselves to a Sales Rep, but I don't want them to be able to go into another users Leads and reassign them to themselves, or change them at all. Thanks!

All Answers

Lee,You can use a validation where $User.Id = OwnerId condition to bass the validationand $User.Id <> OwnerId condition for the validation rule to kick inhttps://help.salesforce.com/articleView?id=000170713&type=1

Actually sorry it's not working at all the above.. AND(ISCHANGED( OwnerId ),$User.Id <> OwnerId) doesn't let me assign it to anyone, it gives an error. If I do AND(ISCHANGED( OwnerId ),$User.Id = OwnerId) I can change it to anyone, but I can keep changing it as well which I don't want. I also can't change it back to myself.

I want it to be that you can only change the owner if you own the Lead, or are a System administrator. I'll keep looking but unfortunately the above doesn't work.