+ Start a Discussion
Haseeb Ahmad 9Haseeb Ahmad 9 

validation rule Restrict transferring of ownership

Hi everyone,

I have this validation rule which only allows admins and superusers to change account owners but I need to add one more condition if the user role contains any of these words.

RVP, ES AE, CS AE, Sales Director

then DO NOT let them change account owners everyone else should be able to change the account owner.

Here is my validation rule:
 
AND(
/* profile exceptions */
$Profile.Name <> 'System Administrator',
$Profile.Name <> 'Super User',


/* account type is Sales */
ISPICKVAL(Account_Type__c, 'Sales'),

ISCHANGED(OwnerId)
)

How can I make this adjustment, thank you for any help.
Best Answer chosen by Haseeb Ahmad 9
ShirishaShirisha (Salesforce Developers) 
Hi Haseeb,

Greetings!

Please refer this thread (https://developer.salesforce.com/forums/?id=9060G0000005kkpQAA) for the sample validation rule which will restrict the user with specific profiles to update the field.

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri

All Answers

ShirishaShirisha (Salesforce Developers) 
Hi Haseeb,

Greetings!

Please refer this thread (https://developer.salesforce.com/forums/?id=9060G0000005kkpQAA) for the sample validation rule which will restrict the user with specific profiles to update the field.

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
This was selected as the best answer
Haseeb Ahmad 9Haseeb Ahmad 9
Thank you Shirisha