3

So, Validation rules return true when you want an error to occur UPPER(LastName) = 'TEST' is what you want, this covers, TEST, test, test, TeST, etc


1

You want INCLUDES... IF(INCLUDES(Job__c, "Doctor") , IF(INCLUDES(States__c, "NewYork"), false, true) , false) Helpful?!


1

I don't think you would be able to count the characters of a multipicklist field in a validation rule or even validation + formula combination. You might have to roll your own before trigger that counts the length of the string & adds an error if it exceeds any particular length. You can optionally eliminate the value separator (;). trigger ...


1

Can you try using this validation rule. The main issue in your validation rule is you are using OR condition in Line 4 you should be using AND condition. I tried the similar validation rule. Replace your roles and profiles based on your requirement. AND( ISPICKVAL(PRIORVALUE(StageName),"Closed Won"), AND( NOT(AND ( Closed_Date__c > TODAY()-3,OR (...


1

This pattern: UserInfo.getProfileId().subString(0,15) != '00e4W00000#####' is generally unwise because it creates fragility in your code. For example, hard-coded Ids can differ between sandboxes and production depending on the specific processes you use to create and deploy components. That's not a real risk with the System Administrator profile, but it's a ...


1

Please note that you need to navigate to the object the rules are on, at which point you will see Validation Rules as one of your view options, along with Details, Fields & Relationships, etc. Second important note, a Custom Setting is not best practice for this requirement. You should instead use a Custom Permission which you can add to any Profile or ...


1

You could create an on-update Flow with a Get Records element to check for any other Products with the Name. If you add a checkbox "Duplicates" to your Product and a Validation Rule that checks for "Duplicates"=TRUE, your Flow can stop the activation.


1

Cropredy's approach is the one I'd take, but if we wanted to stay close to your original attempt, what changes would we need to make (and why do they work)? Re-wording the first bit of cropredy's answer, validation rules prevent the update of a record when the validation formula evaluates to true. AND(LastName <> "Test", LastName <> &...


Only top voted, non community-wiki answers of a minimum length are eligible