-
WhoID is null when send email in sandbox on Contacts
I have created a trigger on task (before Insert) and just displaying the trigger.new value ,i.e, the task which is created . In the debug it is showing me that whoid is null , I am sending the email from "Send An Email" button on the activity history of contacts .
Here is the code for the trigger :-
trigger triggerOnTask on Task (before insert) {
if(trigger.isBefore && trigger.isInsert){
for(task ts : trigger.new){
System.debug('>>>>>>ts'+ts);
System.debug('>>>>>>'+ts.Description);
System.debug('>>>>>>'+ts.whoId);
Id myId=ts.whoId;
}
}
}In the above code, whoId is null in debug when I click on send Email button.
Any suggestions why is the WhoId null in the task created.
Also , this is working in my dev org and I am getting the whoid value but in sandbox it is working on leads but not working on the Contacts.
Log In to reply.
Popular Salesforce Blogs
Amazon Launches Buy with Prime Integration with Salesforce Commerce Cloud
Salesforce Commerce Cloud. This solution allows Salesforce retailers to integrate Buy with Prime seamlessly into their shopping platforms. Buy with Prime for Salesforce introduces various…
FileMaker, Salesforce Integration - Get the Best of Both the Worlds
First things first, why do we need the integration at all? Direct integration between FileMaker and Salesforce allows developers to use the best capabilities of…
How to Access, Create, and Deploy Salesforce Einstein Analytics Dashboard
With the increasing database from different organizations, there is a need for efficient tools to inspect all the data. A cloud-based data analytics tool, Einstein…
Popular Salesforce Videos
Accenture + Salesforce: Making an Impact
Our people and communities are important connection points for support. Hear more from our Salesforce professionals. Check out this video to learn everything you need…
Why Salesforce India is Primed for Growth
Amarendra Kumar, RVP of Alliances and Channels for India at Salesforce, says the region is poised for tremendous growth and opportunity over the next few…
Winter '21 Release | Salesforce Tutorial Video
The Sandbox Preview window for Winter '21 begun on September 11, 2020. You must have an active sandbox on a preview instance before then to…