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
Phillip Moseley 2Phillip Moseley 2 

Have a validation rule that is supposed to be required for only certain profiles but Salesforce is giving error to all users.

I have the following validation rule that I want to give the error message to only the 3 profiles listed below in the rule, but it's currently giving the error to all users. How can I update this rule to give the error message to only these 3 profiles. Thanks for the help!

AND(
OR(
INCLUDES(Primary_Technology_Partner_Involved__c, "Achilles"),
INCLUDES(Primary_Technology_Partner_Involved__c, "Adopt - Pendo"),
INCLUDES(Primary_Technology_Partner_Involved__c, "Bureau Van Dijk"),
INCLUDES(Primary_Technology_Partner_Involved__c, "Commerce Decisions"),
ISBLANK(TEXT(Partner_Type__c)
),
$Profile.Name = 'Jaggaer Sales Partner Group',
$Profile.Name = 'Jaggaer Sales',
$Profile.Name = 'Sales Salesforce Super User'

))
AnkaiahAnkaiah (Salesforce Developers) 
Hi Phillip,

Please try with below.
 
AND(
OR(
INCLUDES(Primary_Technology_Partner_Involved__c, "Achilles"),
INCLUDES(Primary_Technology_Partner_Involved__c, "Adopt - Pendo"),
INCLUDES(Primary_Technology_Partner_Involved__c, "Bureau Van Dijk"),
INCLUDES(Primary_Technology_Partner_Involved__c, "Commerce Decisions"),
ISBLANK(TEXT(Partner_Type__c))),
OR($Profile.Name = 'Jaggaer Sales Partner Group',
$Profile.Name = 'Jaggaer Sales',
$Profile.Name = 'Sales Salesforce Super User'

))

If this helps, please mark it as best answer.

Regards,
Ankaiah
 
Lillie DooleyLillie Dooley
Thanks for sharing really information.

https://www.myccpay.net/
Suraj Tripathi 47Suraj Tripathi 47
Hi Phillip Moseley,

Please use below formula :
 
AND(
OR(
INCLUDES(Primary_Technology_Partner_Involved__c, "Achilles"),
INCLUDES(Primary_Technology_Partner_Involved__c, "Adopt - Pendo"),
INCLUDES(Primary_Technology_Partner_Involved__c, "Bureau Van Dijk"),
INCLUDES(Primary_Technology_Partner_Involved__c, "Commerce Decisions"),
ISBLANK(TEXT(Partner_Type__c))),
OR(
$Profile.Name = 'Jaggaer Sales Partner Group',
$Profile.Name = 'Jaggaer Sales',
$Profile.Name = 'Sales Salesforce Super User' ))

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks and Regards,
Suraj
CharuDuttCharuDutt
Hii Phillip
try Below Validation
AND(
OR(
INCLUDES(Primary_Technology_Partner_Involved__c, "Achilles"),
INCLUDES(Primary_Technology_Partner_Involved__c, "Adopt - Pendo"),
INCLUDES(Primary_Technology_Partner_Involved__c, "Bureau Van Dijk"),
INCLUDES(Primary_Technology_Partner_Involved__c, "Commerce Decisions"),
ISBLANK(TEXT(Partner_Type__c))),
OR(
$Profile.Name = 'Jaggaer Sales Partner Group',
$Profile.Name = 'Jaggaer Sales',
$Profile.Name = 'Sales Salesforce Super User' ))
Please Mark It As Best Answer If It Helps
Thank You!
Phillip Moseley 2Phillip Moseley 2
Hello Everyone, thanks for your help and responses. I think we're close, however the error is being given to these three profiles anytime the opportunity is being edited. Is there a way to update the formula to only show the error when the Partner Technology Partner Involved field has a value. Right now, the error is being shown when there is a value and also when there is not a value, so anytime the opportunity is being edited weather the criteria is met or not, the error is being shown. Thanks again for your help and look forward to your responses. 
Phillip Moseley 2Phillip Moseley 2
Hello, The formula below is not working exactly as expected. It’s throwing an error message anytime the opportunity is edited and then saved instead of just throwing the error when the Primary Technology Partner has a value and the Partner Type field is blank. Is there a way to make the formula give the error just when the Primary Technology Partner has a value and the Partner Type field is blank. Thanks, Phillip