You need to sign in to do that
Don't have an account?
mitsvik
Validating many coditions using NOT
I would like to build a query where i can combine the follwoing three in to on query that is used for record types prospect and member. any advice?
AND(
(RecordType.Name = "Prospect"),
OR(
ISBLANK( PersonMailingCity),
ISBLANK( PersonMailingStreet ),
ISBLANK( PersonMailingPostalCode )),
(NOT($User.BypassVR__c) &&
NOT( OR( ISBLANK(Phone ), REGEX( Phone ,"(\\D?[0-9]{3}\\D?)[\\s][0-9]{3}-[0-9]{4}"))))
NOT($User.BypassVR__c) && ($RecordType.Name = "Member" || $RecordType.Name = "Prospect") && ISBLANK( FirstName)
AND(
(RecordType.Name = "Prospect"),
OR(
ISBLANK( PersonMailingCity),
ISBLANK( PersonMailingStreet ),
ISBLANK( PersonMailingPostalCode )),
(NOT($User.BypassVR__c) &&
NOT( OR( ISBLANK(Phone ), REGEX( Phone ,"(\\D?[0-9]{3}\\D?)[\\s][0-9]{3}-[0-9]{4}"))))
NOT($User.BypassVR__c) && ($RecordType.Name = "Member" || $RecordType.Name = "Prospect") && ISBLANK( FirstName)
You might try putting this in a formula field in the object with return type as boolean. And the query becomes straight forward, where you just check for the formula field to be true.
Hope it helps
RD