Ask Search:
Alice HobbsAlice Hobbs 

Validation Rule to Prevent Opportunity Creation for a specific account record type

I am trying to create a validation rule for opportunities that will keep a certain Account Record type from creating an opportunity.  I have two record types on my opportunities and i have 3 record types from Accounts.  I am trying to not let users create opportunities from an Individual Account.
Best Answer chosen by Alice Hobbs
Jeffrey Jonathan JeyarajJeffrey Jonathan Jeyaraj
Hi Alice
Try this
AND(
ISNEW(),
Account.RecordType.Name = "RecordType Name"
)

All Answers

Dnyaneshwar AghawDnyaneshwar Aghaw
Hi Alice ,
You can create validation Rule like below : 
OR(
$RecordType.Name = 'Record Type1',
$RecordType.Name = 'Record Type2',
$RecordType.Name = 'Record Type3'
)
Thanks
Dnayenshwar 
 
Steve MolisSteve Molis
Like this:
 
AND(
ISNEW(),
Account.RecordType.DeveloperName = "Individual_Account"
)

 
Jeffrey Jonathan JeyarajJeffrey Jonathan Jeyaraj
Hi Alice
Try this
AND(
ISNEW(),
Account.RecordType.Name = "RecordType Name"
)
This was selected as the best answer
Alice HobbsAlice Hobbs
I created the validation rule.  When I go to create the opportunity it still allows me to create an opportunity with an Individual Account.
Steve MolisSteve Molis
Can you post the VR Formula you are using and the Opportunity and Account records?
Can you verify the Account Record Type Name that you are using?   
The Account.RecordType.Name and Account.RecordType.DeveloperName in your VR Formula need to be an exact match of the actual RecordType.Name or RecordType.DeveloperName.  Including upper/lower case, blank spaces, underscores, etc.  

The Record Type Label (green) in this screenshot =   RecordType.Name 
The Record Type Name (blue) in this screenshot =   RecordType.DeveloperName 
User-added image