Validation Rule for a specific lead record type - Answers - Salesforce Trailblazer Community
Ask Search:
Sheri WoodSheri Wood 

Validation Rule for a specific lead record type

For one of my lead record types, I need certain fields populated before it can be converted. My validation rule has no Syntax error but it's not working: 

I have tried it based on $RecordType.Name and RecordTypeID:

AND(IsConverted,
OR (AND ($RecordType.Name = "x",
ISNULL(Business_Issue__c),
ISPICKVAL(Authority__c, ""),
ISBLANK(Current_Integrations__c),
ISPICKVAL(Industry__c , "")
)
)
)

This validation (without the  '(AND ($RecordType.Name = "x"' exists and works properly without the record type criteria.  I've been at this all day...any help is appreciated!
Best Answer chosen by Sheri Wood
Steve MolisSteve Molis
Are you trying to do something like this?
AND(
IsConverted = TRUE,
$RecordType.Name = "x",
OR(
ISBLANK(Business_Issue__c),
ISBLANK(TEXT(Authority__c)),
ISBLANK(Current_Integrations__c),
ISBLANK(TEXT(Industry__c))
)
)

 

All Answers

Steve MolisSteve Molis
Are you trying to do something like this?
AND(
IsConverted = TRUE,
$RecordType.Name = "x",
OR(
ISBLANK(Business_Issue__c),
ISBLANK(TEXT(Authority__c)),
ISBLANK(Current_Integrations__c),
ISBLANK(TEXT(Industry__c))
)
)

 
This was selected as the best answer
Sheri WoodSheri Wood
It worked perfectly! Thank you so much Steve!
Steve MolisSteve Molis
No problem Sheri, glad it worked for you (and thanks for the + Best Answer)