You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have since modified the code in my orgs so a detailed reproduction would be difficult.
Basically I had:
A data table (standard flow data table)
A currency field in the table (multi-currency not enabled, corp. currency USD, currency field on sObject is 2 decimal points)
Using the dynamic collection processor to take the selected rows in and summing up the currency field
The output of the dynamic collection process was piped into a currency formula with 2 decimal points precision. This is the value that was showing as rounded to the nearest dollar
I essentially replaced the objToInteger in my org with
// Convert an object to a Decimal
private static Decimal objToDecimal(Object obj) {
return obj == null ? null : Decimal.valueOf(String.valueOf(obj));
}
and updated the test and now the same currency formula in flow shows non-rounded values.
Overview:
Based on variable names I believe the decimal result should be a decimal, but it is actually an integer.
Steps to reproduce
Steps to reproduce the behavior:
Expected behavior
A decimal should be returned.
Actual behavior
An integer is returned.
The text was updated successfully, but these errors were encountered: