-
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
7 Best Enhancements Coming to Salesforce Field Users with Resco’s Winter Update ‘18
The air is getting colder and the countdown for the Holidays begins. That must mean one thing, it's the Winter Updates time! A decade ago,…
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…
Sales Forecasting Techniques That Are Incredibly Helpful | Salesforce Sales Cloud
Contrary to popular belief, there's more than just maths, logic, and/or science to sales forecasting. There's also a considerable amount of art involved in these…
Popular Salesforce Videos
Is Salesforce Career Recession Proof?
Is Salesforce Career Recession Proof? Watch this video and get all the knowledge about the Salesforce industry. Join this useful group for Salesforce job &…
Leads & Opportunities for Lightning Experience - Create and Convert Leads
Learning Objectives After completing this unit, you’ll be able to: Update a record’s stage or status using Path. Update records in the Kanban view. Use…
Displaying Field Values with Visualforce | Salesforce Video Tutorial
In this video, Rakesh Soni shows us how to display Field Values with Visualforce. This is a great video for anyone who wants to learn…