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
KimberlyJKimberlyJ 

Need help using Record Type in a formula

Would like to create a validation rule using record types.  Keep getting syntax errors.  Just want to have to select a picklist value if dollars are in the currency field.
Thanks.

RecordType.Name = "Networks Services" 
 Services__c <>0,
ISBLANK( Services_Product_Involved__c )
KimberlyJKimberlyJ
Also, is there a way to add multiple record types to the same formula? This needs to happen on two different record types. We tried this:
We did NOT get any syntax errors but it did not work.
Thanks.

RecordType.Name = "Networks Services",
RecordType.Name = "Second Name",
OR(
Services_c<>0,
ISBLANK(Services_Product_Involved__c)))
YuchenYuchen
Can you try the following:

AND (RecordType.Name = "Networks Services", 
 Services__c <>0,
ISBLANK( Services_Product_Involved__c ))


So here in your Validation rule, is the Services__c a number field? If it is, then you can compare it with 0. If it is not, then you can compare it with "null".

If you want to check multiple record types, you can try this:

AND(
OR(
RecordType.Name = "Networks Services",
RecordType.Name = "Second Name"),
OR(
Services_c<>0,
ISBLANK(Services_Product_Involved__c)))
)