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
LoveLaceLoveLace 

arithmetic expression must use numeric argument

Hello guys,

This error is driving me crasy
arithmetic expression must use numeric argument

obj.Without_credit_time_off_amount__c =( (User.Salary__c)/30)*obj.Days__c;

Without_credit_time_off_amount__c currency type
Days__c formula field, number type
Salary__c is a currency type

I've tried to cast the salary__c value but in vain
Maf_007Maf_007
Your problem is User.Salary__c. In order to fetch that field you have to use UserInfo.getUserid().field Name.

Hope this helps.