-
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
ViewAllCampaignMembers report for Salesforce Lightning
"Campaign call down" report in Salesforce Lightning The "Campaign call down" report doesn't seem to be working in the Salesforce Lightning Experience and so our…
3 Key Benefits of Hiring Certified Salesforce Consultants in 2024
Businesses will still have to contend with a highly competitive market in 2024, when having the appropriate tools and tactics might be crucial. One of…
Salesforce Dataloading — Common Pitfalls
If you are a Salesforce Administrator in a large company, you inevitably get to do a lot of data loading. But existing tools like dataloader.io…
Popular Salesforce Videos
Intro to Salesforce Macros
Users can run macros to complete repetitive tasks—selecting an email template, sending an email to a customer, updating the case status—all in a single click.…
10 Example Future Method with Test Class | Asynchronous Apex | Salesforce Development Training Video
Salesforce uses a queue-based framework to handle asynchronous processes from such sources as future methods and batch Apex. This queue is used to balance request workload across…
What is Salesforce - The CRM Bringing Companies & Customers Together
Salesforce is the world’s #1 customer relationship management (CRM) platform. We help your marketing, sales, commerce, service and IT teams work as one from anywhere…