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
EnthEnth 

Roll Up Summary Quirk - non zero values

I just got off the phone with SFDC support. Had a very quirky problem as follows.

 

Have a Roll Up Summary field on Opportunity to total the value of a custom currency field on Opportunity Products - lets call it Total List Price for example. When we create new Opportunties the value is 0, hurrah, and when we add products the value is correctly calculated.

 

The problem arises when the child records are deleted. When the Roll Up Summary field is recalculated it gets a non-zero floating point value (5.443 x 10-36 in my case). This gets rendered as 0 in the UI, but if you have any formula fields or validation rules checking this value, or comparing it to any other, then beware!

 

The solution (workaround) is you need to use something like ABS(total_list_price__c) > 0.00000001 instead of total_list_price__c != 0 in your formula or validation rule, or manually apply the ROUND function to the desired decimal places for your currencies.

 

Hope this helps someone else, it's like going back 20 years in IT!

Best Answer chosen by Admin (Salesforce Developers) 
EnthEnth

Please do not try and provide answers, this post is for information only.

All Answers

EnthEnth

Please do not try and provide answers, this post is for information only.

This was selected as the best answer
Tom MundyTom Mundy
I just found this post, which has resolved a problem where I experienced the same issue as you, so thank you!