I wanted to check emails sent from sales searching for Marketing link on their Bodies. The thing is that I realized that even tho tests were running fine. When I did manual tests the accounts didn't got updated the field
I realized the value of WhoId was being null all the time during the trigger after insert. But if I ran a query just after the triggers I could see the correct value. I searched information and couldn't find any technical answer neither why this happens nor this being suffered from another user.
Finally, after seeing that I decided to move the function to async. Now everything works perfect.
I found this other question. Question
Although the answer that suggest the solution I did works I would like to know why does the Whoid/Whatid only get populated after triggers after insert. Which are this flow's steps?