You need to sign in to do that
Don't have an account?

Formula Fields Not Evaluating when Running testmethod
Hello,
I have an issue where I have conditional logic in a trigger that is based on the value of a formula field. When running a functional test in the UI, this formula field evaluates fine and the trigger logic proceeds as expected. When I run a testmethod with the same use case, the formula field does not evaluate and a bunch of code doesn't get covered.
This is happening in two separate places in two different orgs. I also have the debug logs to prove the formula field is getting evaluated in the functional test and not getting evaluated in the testmethod.
Has anyone ever run into this issue? If so, how do you get around it without rewriting the trigger to mimic the formula field logic?
Thanks very much for any input!
I am having the same problem. Have either of you figured it out?
Any update or ideas? I am having the same issue.