You need two separate Validation Rules
. You specify the Error Message
separately from the Error Condition Formula
.
One of your criteria seems wrong, because when exactly one of the date fields is null, neither rule applies. Based on the error messages in your post, I assume you meant if either date is null and the Status
is not yet 'Activated'
, then the RecordType
must still be 'One'
. Currently you only do the validation if both dates are null.
You should also explicitly ensure the RecordType
is still 'One'
if that is your intention. Right now there may only be two possible values, but that can change.
Inactive Either Null Rule Criteria
AND(
Status != 'Activated',
RecordType.Name != 'One',
OR(Date1__c = null, Date2__c = null)
)
Inactive Neither Null Rule Criteria
AND(
Status != 'Activated',
RecordType.Name != 'One',
Date1__c != null,
Date2__c != null
)