Hey, looks like the rule mentioned in line 26 is calling another rule within it, namely - cdm2_gettimeentrycdtfielddiff. Open the rule mentioned in line 16 and within that whichever line you are calling rule cdm2_gettimeentrycdtfielddiff, check the and() where you are trying to compare variables. In that one would be an integer and another might be a local variable. Just wrap that local variable in a tointeger(). That should help! If not advice you to paste the screenshot of the rule cdm2_gettimeentrycdtfielddiff as called from within the rule timeEntryDetailsForActivityHistory!
In your second rule where you are checking the time entry cdt field difference, add a typecasting logic so that both the values in comparison are of same type.
eg. value1=value2 can be replaced as cast(typeof(value2),value1)=value2
In your case value1 i.e. the old record might be null and thus when you are trying to compare that to value 2, having an integer field in it casting error is coming. By using cast() you can make both the values of the same type so that comparison can happen.
The cdm2_gettimeentrycdtfielddiff() expression is being called from cdm2_timeentrydetailsforactivityhistory() and the values being used by the cdm2_gettimeentrycdtfielddiff() expression are the types of Number and List.
But the values should be in the type of Number to do the successful comparison. That is what the error says.
Check the parameter values and properly index and cast the value to the Number type if needed. Then the issue will get solved. Thanks