+ Start a Discussion
cbrocbro 

(Validation Rule) Prevent change of Account Ownership (by profile)

I am trying to prevent these Profiles from changing Account Owner.

 

This is what I have, but it does not seem to be working.

 

Thanks in advance for any help!

Chris

 

NOT(ISNEW()) && 
  AND( 
      OR( $User.ProfileId ='00e80000001KC2t', 
             $User.ProfileId ='00e80000001KC2s', 
             $User.ProfileId ='00e80000001K8tw',
             $User.ProfileId ='00e30000000eH6i',
             $User.ProfileId ='00e30000000eH6h',
             $User.ProfileId ='00e80000001KCUK'), 
                                                                    ISCHANGED(OwnerId))

 

Best Answer chosen by Admin (Salesforce Developers) 
cbrocbro

odd.  i don't understand why my validation rules are not working?  is there something else it could be in the company settings/sharing or something?

 

Salesforce is investigating what is happening for me now.  I am having a similar issue with another validation rule on  the Leads Object...

 

Not sure what the issue is - or whether it's only in our sandbox.... 

 

I tested it in another Dev environment and it worked...  so I have pushed it to production - and it is working there, as well.  Salesforce is investigating my sandbox - but it may need a refresh

 

NOT(ISNEW()) && 
AND( 
OR( $User.ProfileId ='00e80000001KC2t', 
       $User.ProfileId ='00e80000001KC2s', 
       $User.ProfileId ='00e80000001K8tw', 
       $User.ProfileId ='00e30000000eH6i', 
       $User.ProfileId ='00e30000000eH6h', 
       $User.ProfileId ='00e80000001KCUK'), 
                                                                 ISCHANGED(OwnerId))

 

 

Chris

All Answers

kevin lamkevin lam

I tried your rule in my sandbox (substituting the profile IDs) and it worked.

cbrocbro

odd.  i don't understand why my validation rules are not working?  is there something else it could be in the company settings/sharing or something?

 

Salesforce is investigating what is happening for me now.  I am having a similar issue with another validation rule on  the Leads Object...

 

Not sure what the issue is - or whether it's only in our sandbox.... 

 

I tested it in another Dev environment and it worked...  so I have pushed it to production - and it is working there, as well.  Salesforce is investigating my sandbox - but it may need a refresh

 

NOT(ISNEW()) && 
AND( 
OR( $User.ProfileId ='00e80000001KC2t', 
       $User.ProfileId ='00e80000001KC2s', 
       $User.ProfileId ='00e80000001K8tw', 
       $User.ProfileId ='00e30000000eH6i', 
       $User.ProfileId ='00e30000000eH6h', 
       $User.ProfileId ='00e80000001KCUK'), 
                                                                 ISCHANGED(OwnerId))

 

 

Chris

This was selected as the best answer