-
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
Which Industries Can Use Salesforce in 2024?
What is Salesforce? Salesforce is a cloud-based CRM software. It has a ton of features to help companies with their customer relationships, lead management, case…
Salesforce Customization: Explanation and Examples
Salesforce is a platform packed with features right out of the box. But here's the thing: many businesses feel the need to give it a…
Manipulate and Integrate Salesforce Data Effortlessly with Heroku
This article is prepared by our Salesforce Developer Dmitry Mitkevich. The Salesforce platform plays a pivotal role in managing customer data, sales, and marketing processes. But…
Popular Salesforce Videos
Skill Based Routing with Apex/Flows in Salesforce
This video is the sequel to the omnichannel Salesforce tutorial (LINK) In this video, we will cover: 1. What is Skill-based routing 2. Why is…
Things You Must Know About Salesforce Desk.com
Salesforce Desk.com is an all-in-one customer support application which is completely cloud based and which gives you the ability to buy services on per agent…
Salesforce QA Interview Guidance Program
Do you want to learn what it takes to clear a Salesforce QA interview? In this video, Bava Dharani Ganesan gives a detailed explanation of…