Skip to main content
added 33 characters in body
Source Link
sfdcfox
  • 501.8k
  • 21
  • 473
  • 828

You need to combine and (&&) and or (||) operators, like this:

if(objQuote.records.SYS_Account_Credit_Application__c !== 'No' &&
    (objQuote.records.CAA_Agreement__c ===== null || !objQuote.records.SYS_CAA_Active_Check__c !== 'Active')) {

Note here that you can apply De Morgan's Laws of Boolean Operations: NOT A OR NOT B can be expressed as NOT (A AND B).

if(objQuote.records.SYS_Account_Credit_Application__c !== 'No' &&
    !(objQuote.records.CAA_Agreement__c !== null && objQuote.records.SYS_CAA_Active_Check__c == 'Active')) {

You need to combine and (&&) and or (||) operators, like this:

if(objQuote.records.SYS_Account_Credit_Application__c !== 'No' &&
    (objQuote.records.CAA_Agreement__c == null || !objQuote.records.SYS_CAA_Active_Check__c)) {

Note here that you can apply De Morgan's Laws of Boolean Operations: NOT A OR NOT B can be expressed as NOT (A AND B).

if(objQuote.records.SYS_Account_Credit_Application__c !== 'No' &&
    !(objQuote.records.CAA_Agreement__c && objQuote.records.SYS_CAA_Active_Check__c)) {

You need to combine and (&&) and or (||) operators, like this:

if(objQuote.records.SYS_Account_Credit_Application__c !== 'No' &&
    (objQuote.records.CAA_Agreement__c === null || objQuote.records.SYS_CAA_Active_Check__c !== 'Active')) {

Note here that you can apply De Morgan's Laws of Boolean Operations: NOT A OR NOT B can be expressed as NOT (A AND B).

if(objQuote.records.SYS_Account_Credit_Application__c !== 'No' &&
    !(objQuote.records.CAA_Agreement__c !== null && objQuote.records.SYS_CAA_Active_Check__c == 'Active')) {
Source Link
sfdcfox
  • 501.8k
  • 21
  • 473
  • 828

You need to combine and (&&) and or (||) operators, like this:

if(objQuote.records.SYS_Account_Credit_Application__c !== 'No' &&
    (objQuote.records.CAA_Agreement__c == null || !objQuote.records.SYS_CAA_Active_Check__c)) {

Note here that you can apply De Morgan's Laws of Boolean Operations: NOT A OR NOT B can be expressed as NOT (A AND B).

if(objQuote.records.SYS_Account_Credit_Application__c !== 'No' &&
    !(objQuote.records.CAA_Agreement__c && objQuote.records.SYS_CAA_Active_Check__c)) {