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
TheMayorTheMayor 

Validation Rule for Account Names On OPPS

Ok... so I'm a novice on Validation rules.... I want to make sure certain accounts (names) are not used in Opportunities.

 

Can someone assist me with that that validation string would look like?

 

Thanks

Ken

PilkoTechPilkoTech

It's probably easier to add a custom field to the Account, something like No_Opptys_Allowed__c, then validate to that:

 

NOT (Account.No_Opptys_Allowed__c)

 

If you only had a simple string to validate to, say you wanted to make sure other locations of your own company, named "MyBigCo" didn't have opportunities, you could use this:

 

FIND("MYBIGCO", UPPER(Account.Name)) = 0

 

You need to be careful though, if you work for "GE", since this would also exclude "GES" and "Osage, Inc."