-
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
Salesforce IoT Cloud Consulting Services: Enhancing Customer Experience
The way businesses engage with consumers, devices, and data has been changed by the Internet of Things (IoT). With the ability to communicate with consumers…
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…
Salesforce Spring '22 Release - Get to Know the Highlights
Here we are standing at the beginning of a brand new year full of promise and opportunity, both for ourselves (failing resolutions notwithstanding) and our…
Popular Salesforce Videos
Event Driven Development on Salesforce | All About Event in Salesforce
In this session, we will talk about Event-Driven Development in Salesforce. Let’s take a look into the many ways events have changed the way we…
How to Create an Object in Salesforce Lightning Experience?
Salesforce has always emphasized on declarative development since the beginning. The motto is that enterprise software should be easy to use for customers. With “clicks…
Salesforce Security – An Encryption Guide For The Paranoid
If you are using Salesforce, you would be having a lot of data stored in Salesforce objects. Some of it would even be sensitive enough…