I have a validation rule that doesn't seem to work. I think the issue is the Stagename field. I've tried the Stagename values with and without spaces. When I have a record that should meet the criteria, no error message is displayed. The rule should work like this:
If Stage name is equal to Closed – Won or Closed-No Sale, the Opportunity_outcome field is not blank,the Primary_Reason_Won_or_Lost__c field is blank, and the user does not have the By Pass Opportunity Validation Rules permission then the rule fires.
I'm not sure what I'm doing wrong. Please see the rule below.
AND(
(
ISPICKVAL ( StageName , 'Closed - Won' ) ||
ISPICKVAL ( StageName , 'Closed - No Sale' )),
(
NOT(ISPICKVAL (Opportunity_Outcome__c, '' )) &&
ISPICKVAL( Primary_Reason_Won_or_Lost__c,'' )),
NOT( $User.By_Pass_Opportunity_Validation_Rules__c )
)