-1

I have my work flow with validation rule and eventho I am trying to not fire when those ownerId are submitting it. it still does

OR( 
    Owner.Id <> "00516000006OnYB" , 
    Owner.Id <> "005G0000002YHAe" , 
    Owner.Id <> "005G0000005Foy2" , 
    Owner.Id <> "00516000006Tdoh" , 
    Owner.Id <> "005G0000004qehs"
) && 
Order_Paperwork_Complete__c = TRUE
1

1 Answer 1

2

The reason why your rule is firing anyways is because your criteria is wrong. OR means that any condition will allow the rule to fire, while AND means that all the conditions must be necessary to fire.

Let's walk through an example:

OR( 
    Owner.Id <> "00516000006OnYB" , 
    Owner.Id <> "005G0000002YHAe" , 
    Owner.Id <> "005G0000005Foy2" , 
    Owner.Id <> "00516000006Tdoh" , 
    Owner.Id <> "005G0000004qehs"
) && 
Order_Paperwork_Complete__c = TRUE

When Owner.Id is 00516000006OnYB:

OR(
    FALSE, // It is equal, so Boolean FALSE
    TRUE,  // Is not equal, so Boolean TRUE
    TRUE,  // Ditto...
    TRUE,
    TRUE
) && TRUE

FALSE OR TRUE evaluates to TRUE, so the rule triggers.

However, if you change the formula to AND:

AND(
    FALSE, // It is equal, so Boolean FALSE
    TRUE,  // Is not equal, so Boolean TRUE
    TRUE,  // Ditto...
    TRUE,
    TRUE
) && TRUE

FALSE AND TRUE is FALSE, so the entire formula eventually evaluates to FALSE, and the rule will not trigger.

1
  • Thank you very much for the respond, it works perfectly now
    – Metawaa
    May 2, 2016 at 18:12

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