Hello,
I am trying to create a validation rule that if the record type does NOT equal any of 5 specific record types then one of two specific fields cannot be blank.
This is what I came up with but I am getting a missing "(" error.
Can someone please advise?
OR(
RecordType.DeveloperName != 'ACH Customer Funds Movement',
RecordType.DeveloperName != 'Direct Customer File',
RecordType.DeveloperName != 'Fintech',
RecordType.DeveloperName != 'Fiserv Premier Customer Funds Movement',
RecordType.DeveloperName != 'Klarivis',
OR(
ISBLANK(Not Set as Pay-Out),
ISBLANK(Set as Pay - Out)
))
#Salesforce Developer #Validation Rule #Validation Error
Hey Andy,
There are several things...
First of all, you should consider to use the correct developer names of the record types. Those are the names listed under the 'Record Type Name' for the given record type:
See for example (created several test record types for the object 'Order'):
Next your formula is missing one closing parenthesis at the end. However, the logic also needs to use AND () instead of OR () for the record type checks.
So the correct formula for your VR is the following:
AND (
RecordType.DeveloperName <> 'ACH_Customer_Funds_Movement',
RecordType.DeveloperName <> 'Direct_Customer_File',
RecordType.DeveloperName <> 'Fintech',
RecordType.DeveloperName <> 'Fiserv_Premier_Customer_Funds_Movement',
RecordType.DeveloperName <> 'Klarivis',
AND (
ISBLANK (Not_Set_as_Pay_Out__c),
ISBLANK (Set_as_Pay_Out__c)
)
)
Best
Serkan