0

We have a Roll-Up Summary Field on Opportunity called "Net Deposits" that sums up the Sales Price of the Opportunity Products. We have enabled Multi-Currency for our org (Corporate Currency is USD). Each Opportunity also has its own currency. For example, an Opportunity has two Opportunity Products each with a Sale Price CAD 10,000.00 (USD 7,888.71) and "Net Deposits" will display CAD 20,000.00 (USD 15,777.41)

We have a workflow that sends an email alert when "Net Deposits" is over a certain amount for different currencies. This part is for CAD:

AND( Base_Currency__c = "CAD", Net_CP_Deposits__c > 20000)

Base_Currency__c is just a formula field TEXT(CurrencyIsoCode)

The issue is the alert is triggered when "Net Deposits" is EXACTLY CAD 20,000

I debug the workflow for this opportunity and one line shows this:

Values:Net_CP_Deposits__c=20000.00000000000000000000000000000000000953080, Base_Currency__c=CAD

I can't figure out why it has the lingering 953080 which causes it to be over 20,000. I recreated this workflow in a Flow and strangely it works as expected (does NOT trigger when it's 20,000). So I want to understand why the Roll-Up Summary field is not exactly 20,000 in a WF and why this is not an issue in a Flow?

3
  • Are Dated Exchange Rates enabled?
    – Adrian Larson
    Mar 16 at 17:05
  • No it's not enabled
    – Ernest
    Mar 16 at 17:41
  • change your condition formula to AND( Base_Currency__c = "CAD", ROUND(Net_CP_Deposits__c,0) > 20000); see Help
    – cropredy
    Mar 18 at 19:48

1 Answer 1

0

This seems similar to a known SalesForce issue from 6 days ago - currently in review here.

It may also be helpful to check out this article on SF fields Behavior of decimal numbers when rounded off. There's a chance the fields you're seeing as included in the rollup value are rounded in the layout view, but they may actually have more decimal places that are hidden but stored in the SF database, contributing to the trailing 953080.

There is also an answer here that references setScale in SalesForce.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.