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
Alesha KuhlmanAlesha Kuhlman 

Trying to get a Validation rule to work but it is not working? Any help is appreciated.

AND(
Or(
(ISPICKVAL(StageName , "9 - Closed/Lost (0%)")),
(Ispickval(StageName, "6 - Closed/Won (100%)"))),
 
ISBLANK(Text( Close__c )), 
 
or(not
($RecordType.Name = "Existing Business Renewal '17",
$RecordType.Name="Service/SOW '17",
$RecordType.Name="Recurring Revenue"))
)
 
Best Answer chosen by Alesha Kuhlman
Sridhar NarayansaSridhar Narayansa
Try this. I switched not and or.

AND(
Or(
(ISPICKVAL(StageName , "9 - Closed/Lost (0%)")),
(Ispickval(StageName, "6 - Closed/Won (100%)"))
),
 
ISBLANK(Text(Close__c )), 
 
not(or
($RecordType.Name = "Existing Business Renewal '17",
$RecordType.Name="Service/SOW '17",
$RecordType.Name="Recurring Revenue"))
)

All Answers

Alesha KuhlmanAlesha Kuhlman
I have the required field Close_C that i dont want required for 3 types of opp records.
Sridhar NarayansaSridhar Narayansa
Try this. I switched not and or.

AND(
Or(
(ISPICKVAL(StageName , "9 - Closed/Lost (0%)")),
(Ispickval(StageName, "6 - Closed/Won (100%)"))
),
 
ISBLANK(Text(Close__c )), 
 
not(or
($RecordType.Name = "Existing Business Renewal '17",
$RecordType.Name="Service/SOW '17",
$RecordType.Name="Recurring Revenue"))
)
This was selected as the best answer
Alesha KuhlmanAlesha Kuhlman
thank you so much! What an easy fix