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
mpoiriermpoirier 

Formula evaluation

Hi,

 

When does formula evaluation happens ?

 

Can I assume that formula fields are already evaluated if I want to use their content in triggers ?

 

Where can I find documentation about this ?

 

Thanks !

 

Michel

Best Answer chosen by Admin (Salesforce Developers) 
snugglessnuggles
yep, at the time you try to read their content.  this is always the behavior i have observed anyway.  i don't think the information is ever actually committed to the database, i think the fields are just access points to data that get computed "on demand"

All Answers

snugglessnuggles

hi mpoirier,

 

formulas are evaluated at the time they are referenced.  so when a page loads, when a report is run, or when they are referenced elsewhere.

mpoiriermpoirier

Hi,

 

"at the time they are referenced" meaning when I attempt to read their content ? Perfect !

 

Thanks !

snugglessnuggles
yep, at the time you try to read their content.  this is always the behavior i have observed anyway.  i don't think the information is ever actually committed to the database, i think the fields are just access points to data that get computed "on demand"
This was selected as the best answer
JEndoJEndo

Does anyone have any links to specific documentation on this?  Just looking for something in writing from SFDC to back up what's been stated here.