-
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
First Step to as a Salesforce Developer
So the things would get exciting now. I'll first accomplish the Customization part and then gradually move on to the Programming aspect. You have an…
How Integrating Salesforce with Accounting Tools Helps Businesses to Change the Operational Paradigm
In a world where work from home has become the new normal, businesses quickly need to adapt to the changing market scenario. Companies must take…
6 Ways To Utilize Salesforce Sales Cloud To Its Fullest
Salesforce holds the top spot in the industry when it comes to streamlining business processes. Having been around for over 20 years now, Salesforce has…
Popular Salesforce Videos
Object Oriented Programming - Salesforce Developer Tutorial
In relation to programming languages, object-oriented means that the code focuses on describing objects. An object can be anything that has unique characteristics, such as…
Which Certification Is Needed In Salesforce for Getting Job?
Want to get a job in the Salesforce industry? Wondering which certifications are going to help. Join this useful group for Salesforce job & career…
Get Rich Insights on Your Salesforce Users With Tableau | Did You Know
Did you know you can use Tableau to get rich insights on your Salesforce users? Login history, geo, browser, OS, and more are all at…