Loading

Trailing Decimal Zeros Truncation in Currency Fields during Flow processing.

Julkaisupäivä: Aug 25, 2025
Kuvaus

There is an issue concerning the truncation of trailing decimal zeros in currency fields, specifically when the values are queried in a flow and subsequently passed as input to an Apex invocable method. In such instances, when entering values like 10.00 or 25.00 in currency fields, the decimal zeros are automatically truncated during the flow process. This truncation leads to inaccurate representation of currency values, particularly when dealing with precise monetary amounts.

Ratkaisu
  1. Instead of retrieving the values directly in the flow, pass the Object record ID to the Apex class and query the values using SOQL within Apex as in the apex there is no issue with truncation.
  2. Query the records in the flow as it is and use the Apex setScale(scale) method of Decimal Class to set the scale of decimal places to the value required after passing the value in the apex invocable method.
Knowledge-artikkelin numero

001186466

 
Ladataan
Salesforce Help | Article