Loading
Prepare for Email to Become the Default Login ExperienceRead More
Ongoing maintenance for Salesforce HelpRead More
Extend Salesforce with Clicks, Not Code
OR

OR

Determines if expressions are true or false. Returns TRUE if any expression is true. Returns FALSE if all expressions are false.

Use this function as an alternative to the operator || (OR)

Use

OR(logical1, logical2...) and replace any number of logical references with the expressions you want evaluated.

Formula Field Example
Formula Field Example IF(OR(ISPICKVAL(Priority, "High"), ISPICKVAL(Status, "New")), ROUND(NOW()-CreatedDate, 0), null)

This formula returns the number of days a case has been open if the Status is new or the Priority is high. If the case was opened today, this field displays a zero.

Validation Rule Example
Validation Rule Example
OR(Sample_Rate__c < 0, Sample_Rate__c > 0.40)

This validation rule formula displays this error message when the Sample Rate custom field value isn’t between 0% and 40%: “Sample Rate cannot exceed 40%.”

 
Loading
Salesforce Help | Article