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
Alfonso Fernandez 6Alfonso Fernandez 6 

Validation Rule for Case

I am trying to create a validation rule on case that checks that the related account has a true value in the 'isprimarymember' field (its a check box) and that accound has a certain record type. I also want to make sure that type is set to a specific value as well. However, this is not working. Its allowing me to save with accounts that are not primary and have a different record type.

Any help would be appreciated.

AND( 
Account.IsPrimaryMember__c = TRUE, 
$RecordType.Name = "Individual", 
ISPICKVAL(Type, "Member Reassignment") 
)
Nayana KNayana K
"Its allowing me to save with accounts that are not primary and have a different record type."

This means you want throw an error when it is not primary and not particular type / record type. 
 
OR( 
Account.IsPrimaryMember__c != TRUE, 
$RecordType.Name != "Individual", 
NOT(ISPICKVAL(Type, "Member Reassignment"))
)

Please try this once