+ Start a Discussion
lil_rangerlil_ranger 

Require Checkbox to be checked based off of picklist values and record type

AND(
ISPICKVAL(Type, 'New Partner'), 
ISPICKVAL(StageName, 'Closed Won'), 
NOT(Verified__c),
RecordTypeId = '000000000'
)

 I thought I got this right, but it's not working like I thought.  I'm trying to create a rule if the check box is not checked.  It will work if I just have NOT(Verified__c) and nothing else, but when I add in the record type and picklists it saves w/o requiring the checkbox to be checked

Best Answer chosen by Admin (Salesforce Developers) 
Steve MolisSteve Molis
AND(
TEXT(Type) = "New Partner", 
IsWon = TRUE, 
Verified__c = FALSE,
$RecordType.Name = "Rec Type Name")

 

All Answers

Kunal01Kunal01

Hi Lil,

 

Check with this validation rule may be it will work.

 

 

AND(
ISPICKVAL(Type, 'New Partner'),
ISPICKVAL(StageName, 'Closed Won'),
NOT(Verified__c),
$RecordType.Id  = '000000000'
)

 

One more the its better not to use ID as it is diff in Sandbox and Prod. So its better to use name instead of RecordType ID.

 

 

Thanks,

Kunal.

lil_rangerlil_ranger

I tried what you suggested and still was able to save the opportunity without the box being checked.

Steve MolisSteve Molis

btw - why are you using '$RecordType.Id  = '000000000'' instead of '$RecordType.Name  = "Name"?  

Steve MolisSteve Molis
AND(
TEXT(Type) = "New Partner", 
IsWon = TRUE, 
Verified__c = FALSE,
$RecordType.Name = "Rec Type Name")

 

This was selected as the best answer
Steve MolisSteve Molis

double+triple check the spelling and punctuation of the values in your formula against the values in your fields.  Everything has to match EXACTLY: spelling, blank spaces, upper/lower case, EVERYTHING...

lil_rangerlil_ranger

Thank you Stevemo! 

Steve MolisSteve Molis

No problem, you owe me a beer.  

 

And I like to drink these! -> http://beeradvocate.com/beer/profile/863/7971
 

lil_rangerlil_ranger

Pliny the Elder

 

I hope this is enough to last you for a little while.

Steve MolisSteve Molis

Now THAT'S what I call Bowling!!!