-
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
What is workflow automation and what can it do for me?
The one thing you're guaranteed to find in every active instance of Salesforce.com is interaction. It is a given that your users will add,edit,and/or remove data…
Getting Up-Close With The Future Of Salesforce’s Ever-Evolving Tech Ecosystem
“Change is the only constant.” - Heraclitus If any organization across the globe has truly lived by this saying, it is Salesforce. What began as…
Popular Salesforce Videos
Introduction To Salesforce | Salesforce Training Videos For Beginners
Are you confused to choose the best edition tool? For CRM and Branding then here is the information for you! Salesforce is one of the…
How to Become a Salesforce Consultant at Any Age
Companies are in great demand of skilled Salesforce consultants as a means to achieve their Salesforce objectives for better output in their business. With the…
Things you can do with Loyalty Management in Salesforce to Create Lifelong Customers
Although keeping customers is not always simple, statistics show that when they are a part of an ongoing customer loyalty management program, they spend 67%…