-
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
How to Create User in Salesforce | The Developer Guide
Introduction: A user is a person who has credentials to login into Salesforce and is able to use the assigned application in Salesforce. The user…
Top Salesforce Implementation Companies in New Jersey in 2024
In the modern business landscape, where customer relationships are at the heart of success, companies need robust tools to manage interactions and drive growth. Salesforce,…
A Complete Guide on How Real Estate Can Streamline Its Sales Funnel With Salesforce
As more and more people invest in Real Estate, the competition among the dealers is increasing rapidly. If you are a Real Estate dealer, you…
Popular Salesforce Videos
Difference between Profile and Roles in Salesforce
Learn about the difference between Profile and Roles? Watch this video and do let us know if you have any questions or concerns.
Kizzy Consulting - Top Salesforce Partner Intro Video
Kizzy Consulting is a Salesforce Consulting Partner and has successfully implemented 100+ Salesforce projects for 100+ clients across sectors like Financial Services, Insurance, Retail, Sales, Manufacturing,…
How To Set Up A Site On Salesforce | Salesforce Development Tutorial
Learn how to set up a site on Salesforce. This tutorial will cover the following points - 1. Create Public Websites Choose a branded URL…