I'm writing an Apex trigger that needs to fire if the opportunity record has one of two values selected on the Forecast Category picklist fields AND a field on the related account is null. How do I represent the following
IF( criteria one AND (criteria two OR criteria three)?
Previously the trigger only needed to be one value from the forecast category picklist and the account field being null, and my trigger worked perfectly. Now it isn't working as intended. Code is below.
for(opportunity o : trigger.new){
if((o.ForecastCategoryName == 'Commit'||
o.ForecastCategoryName == 'Won') &&
o.account.paycom_account_number__c == null){