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
MSVRadMSVRad 

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
mpannmpann
You can add $RecordType.Name ="xyz" to your validation formula, where xyz is the displayed name of the record type.
zen_njzen_nj

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:

 

AND

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

ISPICKVAL( ApprovedBy__c ,"")
)