Can anybody explain me what does this validation rule does. This is on standard object Account.
AND(
OR(
RecordType.Name=="Subcontractor"
),
OR(
ISNEW(),
ISCHANGED(RecordTypeId)
),
NOT($Setup.VRuleSettings__c.HasSubsRTAccess__c )
)
Can anybody explain me what does this validation rule does. This is on standard object Account.
AND(
OR(
RecordType.Name=="Subcontractor"
),
OR(
ISNEW(),
ISCHANGED(RecordTypeId)
),
NOT($Setup.VRuleSettings__c.HasSubsRTAccess__c )
)
The following points all have to resolve to true for the validation rule to trigger an error:
I'd format it like this. It makes what it does clearer.
AND( OR(RecordType.Name=="Subcontractor"),
OR(ISNEW(), ISCHANGED(RecordTypeId)),
NOT($Setup.VRuleSettings__c.HasSubsRTAccess__c )
)
This is True if the
((record type is subcontractor) AND
(the record is a new one OR the record type ID has changed)) AND
( Not ...HasSubsRtAccess__c is True)
I'm not sure what that last condition means, but if it isn't true, the whole expression will be false. So, ...HasSubsRtAccess__c must be false (because of the NOT) for the whole condition to be True.
AND
between record type is subcontractor
and the record is a new one OR the record type ID has changed
not and OR
.
Commented
Feb 5, 2015 at 16:04