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
ktvitktvit 

How to create a validation rule with multiple records types and multiple stages?

Hi Community: I am trying to create a validation rule that accomplishes the following:

IF the Record Type name is New Business Lever 1 or New Business Lever 2
And the field "Why Now?" is NOT checked (false)
THEN you cannot advance FROM Discovery to the following stages: Qualified Opportunity, Proposal Development, Executive Business Review, POC, Negotiation, or closed.

This is what my rule looks like, but even when the box equals TRUE, it will not let me advance.
 
AND (
OR (
ISPICKVAL(StageName, "Qualified Opportunity"),
ISPICKVAL(StageName, "Proposal Development"),
ISPICKVAL(StageName, "Trial & Proof of Concept"),
ISPICKVAL(StageName, "Executive Business Review"),
ISPICKVAL(StageName, "Negotiation"),
ISPICKVAL(StageName, "Closed"),
OR(
$RecordType.Name= "New_Business_Lever_1",
$RecordType.Name= "New_Business_Lever_2"
),
Why_Now__c =FALSE)
)

Can anyone tell me what I'm doing wrong? Thanks!!
Trailblazer7Trailblazer7
Could you try this Instead,
AND (
OR (
ISPICKVAL(StageName, "Qualified Opportunity"),
ISPICKVAL(StageName, "Proposal Development"),
ISPICKVAL(StageName, "Trial & Proof of Concept"),
ISPICKVAL(StageName, "Executive Business Review"),
ISPICKVAL(StageName, "Negotiation"),
ISPICKVAL(StageName, "Closed")),
OR(
$RecordType.Name= "New_Business_Lever_1",
$RecordType.Name= "New_Business_Lever_2"
),
Why_Now__c =FALSE
)


 
ktvitktvit
So I tried this, and there's no syntax error... but then the rule doesn't fire even when the checkbox is false.
CharuDuttCharuDutt
Hii Ktvit
Try Below Validation
AND (Why_Now__c = false,
OR (
ISPICKVAL(StageName, 'Qualified Opportunity'),
ISPICKVAL(StageName, 'Proposal Development'),
ISPICKVAL(StageName, 'Trial & Proof of Concept'),
ISPICKVAL(StageName, 'Executive Business Review'),
ISPICKVAL(StageName, 'Negotiation'),
ISPICKVAL(StageName, 'Closed')
),
OR(
RecordType.DeveloperName = 'New Business Lever 1',
RecordType.DeveloperName = 'New Business Lever 2'
))
Please Mark It As Best Answer If It Helps
Thank You!
ktvitktvit
this doesnt work either :( everything works except the record type specification.