-
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
Sales Cycle in Salesforce - How to Better Manage!
Like a blueprint or an architecture is a must for all to enhance their productivity in Salesforce, we have a sales cycle to follow up the…
Control Salesforce Lightning Tabs With Next & Back Buttons
Hello, In this post, we are going to create a sample lightning component to control <lightning:tab> with Next and Back buttons. In this code we…
A Deep Dive Into Salesforce Winter '23 Analytics Updates
In this blog, we take a look at the new features and updates to Salesforce Analytics from the Winter '23 release. Custom Report Types As…
Popular Salesforce Videos
Salesforce Marketing Cloud Connect
We explore the key benefits of Marketing Cloud Connect as the start of a four-part series surveying the power, flexibility, and personalization that can be…
Dreamforce 2019 - An Overview!
Salesforce Dreamforce2019 is scheduled for November 19-22 in San Francisco, California at the Moscone Center. #Dreamforce is one of the largest cloud and SaaS-centric conferences…
Customize Salesforce Lightning Home page
In this video Signiforce shows : How to customize the Salesforce Lightning Home page. Update an existing Salesforce lightning home page or create a new…