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
Phuc Nguyen 18Phuc Nguyen 18 

Formula field not being detected as changed in Apex class

Hello All,
Trying to detect when a formula field is being updated in my Apex Class  but I am only seeing the original value.  I can see the new value on the page layout and can see the update in the history.  I am working in the after update of the Apex Class.  Any thoughts why I am not seeing the new value in the class?
Thanks,
P
Best Answer chosen by Phuc Nguyen 18
VinayVinay (Salesforce Developers) 
Hi Phuc,

As per my understanding,  Value of a formula field is not stored in the database and doesn't change value as you would expected.  The formula itself it stored and when the field is queried the formula is executed to calculate the formula value which is then returned or displayed.

Thanks,