0

I have these particular VR and I needed to open new question because has a specific problems.

There are both (in Account object):

  1. Check that a field is not empty in an specific State:
AND(

ISPICKVAL(Status__c , "Incubator"),

ISBLANK(Field01__c))
  1. Check that user has special permissions:
AND(!$Setup.Bypass__c.ValidationRule__c,

!$Permission.IntegrationPermissions,

$User.Username != $Label.PERMISSION_USER)

So, I would like to have both VR in just one, checking that IF ONE OF THESE TWO CASES happens. Is like:

OR( VALIDATION RULE 1, VALIDATION RULE 2)

I tried but I had sintax mistakes. Any idea?

2 Answers 2

0

You should ideally be using two validation rules for these two apparently separate scenarios. That said, if you still insist, just add an OR between them:

AND(
    ISPICKVAL(Status__c , "Incubator"),
    ISBLANK(Field01__c)
)
||
AND(
    !$Setup.Bypass__c.ValidationRule__c,
    !$Permission.IntegrationPermissions,
    $User.Username != $Label.PERMISSION_USER
)

Or, use OR:

OR(
    AND(
        ISPICKVAL(Status__c , "Incubator"),
        ISBLANK(Field01__c)
    ),
    AND(
        !$Setup.Bypass__c.ValidationRule__c,
        !$Permission.IntegrationPermissions,
        $User.Username != $Label.PERMISSION_USER
    )
)
0

OR( AND( ISPICKVAL(Status__c , "Incubator"), ISBLANK(Field01__c) ), AND( !$Setup.Bypass__c.ValidationRule__c, !$Permission.IntegrationPermissions, $User.Username != $Label.PERMISSION_USER ) )

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .