0

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?

2
  • did you ever find any solution for this, pls help as i'm facing the exact issue.
    – SMorse
    Jan 10 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 at 14:32
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.