+ Start a Discussion

Is this Validation Rule Possible??

I want to write a validation rule like this but cannot figure out how to do so. 


If the record type of the record = xyz  and a picklist option from a standard picklist = abc then an option must be selected for another picklist.


I know how to do the part where if the standard picklist has an option = abc then require another picklist I just do not know how to add in the record type portion.

Message Edited by MSVRad on 08-28-2009 09:37 AM
You can add $RecordType.Name ="xyz" to your validation formula, where xyz is the displayed name of the record type.

Or you can use the recordtypeid value.


For example, we have a validation rule for a special Case Record Type (you can find what the recordtypeid is for that case record type) where if the Case Status belongs to one of 3 values, you must provide a value to a Custom picklist field called ApprovedBy:



RecordTypeId = "0120000000002LY",
ISPICKVAL( Status,"Approved Change Control"),
ISPICKVAL( Status,"Approved Weekend Work"),
ISPICKVAL( Status,"Rejected Change Control")

ISPICKVAL( ApprovedBy__c ,"")