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
Sujit KarandeSujit Karande 

Disable validation rule for particular profile

Hello There,

I hope you all are well.

I have one field in the Opportunity named "Competitors" and right now there is validation rule assigned to it. So user (Of any profile) cannot save the opportunity if that field is blank.

And I have many types of profiles in my Org and one of is Sales profile (There is about 20 Sales profile like Sales User, Sales Admin etc). I would like to skip the validation for that field if the profile is of type Sales.

So in Short: All Sales profile should able to save the opportunity even "Competitor" field is blank

Any help will be really appreciated
Heather ThompsonHeather Thompson
You can add the Profile ID/Name to your Validation rule. 

Something like:
IF(YourCriteria && !$User.Profile.Name = 'Sales')
Hello Sujit,

You can add this condition in validation rule to disable for particular profile

NOT($Profile.Name = "Sales")