Here's an interesting problem (that I hope someone has a solution to!)
I have a Case that gets created in an Apex controller. The page has a button which then sends an email about this Case you just created. Works well, so far so good.
One field on this case is a boolean. The person who made this email template didn't want "true/false" in the email. They wanted "yes" or "no", so they created a formula field that writes Yes if my bool is true and No if false.
This also works perfectly fine, and the yes/no formula is used in the email.
However, the formula doesn't seem to populate in time to send the email.
I have debugs around the Case insert that verify bool == true before insert, and after insert, the formula field is still null. I receive the email, and the value is null. I go in and check on my record, and it's "Yes"! (Or "No" if false. Like I said, this works fine).
So I am assuming that there's something with the timing here. How can I approach this so that I can ensure I get the value reflected in the Email? Am I correct in my assumption of the issue?