Loading
Prepare for Email to Become the Default Login ExperienceRead More
Extend Salesforce with Clicks, Not Code
|| (OR)

|| (OR)

Evaluates if at least one of multiple values or expressions is true. Use this operator as an alternative to the logical function OR.

Use

(logical1) || (logical2) and replace any number of logical references with the values or expressions you want evaluated.

Case Example
Case Example

IF((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
(Discount_Rate__c < 0) || (Discount_Rate__c > 0.40)

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

 
Loading
Salesforce Help | Article