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 Number_Content_Interactions__c. 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?

  • did you ever find any solution for this, pls help as i'm facing the exact issue.
    – SMorse
    Jan 10, 2021 at 23:35
  • As I explain on the question my solution was to move it to an asyncronous function, although not ideal, it does the job. I didn't marked the question as answered since my doubt was not about the workaround but to understand why this is happening and if someone could provide the reasoning behind. Mar 15, 2021 at 14:32

1 Answer 1


The problem is when the trigger get fired from the outlook to salesforce, Whoid and whatid are not immediately available for trigger. Salesforce for Outlook currently doesn't populate the Related to:(whoID and WhatID) for Tasks and events when syncing from Outlook to Salesforce.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .