Count Field - Null value #694
-
|
Hi James Love the apex rollup functionality, really makes rollups easier in flow as well! I have a particular flow that fires for Contract, and looks to roll up the total count of "active" contracts to an Account. I've noticed that it's working as I'd expect, tallying up the contracts that are active and subsequently also removes the number if they go into a non-active status, but I've noticed if all contracts against an Account goes into a non-active status, the rollup field I'm using on Account essentially becomes null. Not sure if there's a way for me to default the rollup field to 0, assuming there's no records meeting the criteria anymore? Thanks for the great tool! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
Just realised I missed the "Full Recalculation Default Number Value" option and answered my own question! |
Beta Was this translation helpful? Give feedback.
-
|
Hey @simoneduckworth, yes, you can use the "Full Recalculation Default Number Value" on your rollup metadata to override null to 0. By default, the framework uses null because that is the same behavior that SOQL uses, but with that piece of configuration it's quite easy to override! |
Beta Was this translation helpful? Give feedback.
Just realised I missed the "Full Recalculation Default Number Value" option and answered my own question!