-
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
What is a Queue in Salesforce? | All You Need to Know
Salesforce queues facilitate the prioritization, dissemination, and assignment of data to teams that collaborate within an organization. Because of queues, employee tasks are more effectively…
What is Enhanced Domain Security in Salesforce in 2023?
What is Enhanced Domain? Enhanced domains are the latest version of My Domain that meets the latest browser requirements. With enhanced domains, all URLs across your…
Invoke Apex Class From JavaScript Button in Salesforce
Introduction In this blog, we will learn how to call an apex class from a custom button or the Javascript button from the object detail…
Popular Salesforce Videos
Salesforce training video for beginners
Salesforce is an innovative tool that can be very powerful when used properly. That’s why it’s important to find effective and trustworthy ways to learn…
Journey To A Salesforce Solution Architect
A Salesforce Solution Architect must master a number of skills to be able to solve complex business requirements. In this session, we will cover 10…
FlexDeploy for Salesforce
FlexDeploy can improve your enterprise software development, operations, and release processes using out-of-the-box support for Salesforce. See how FlexDeploy supports org-based development, source-driven development, or…