function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Angela Skenderi 2Angela Skenderi 2 

I have receieved an erorr "Condition expression must be of type Boolean: Decimal" for the statment: else if (taxYears.Total_Tax_Year_To_Date__c). Could I get some advice on how to fix the issue?

AnkaiahAnkaiah (Salesforce Developers) 
Hi Angela,

What is the data type of Total_Tax_Year_To_Date__c field?

thanks!!
Angela Skenderi 2Angela Skenderi 2
Hi Ankaiah,

It's in type Decimal.
AnkaiahAnkaiah (Salesforce Developers) 
You need to check the if condition like below.
If(taxYears.Total_Tax_Year_To_Date__c!=Null){
//process the logic
}

If this helps, Please mark it as best answer.

Thanks!!