-
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
Introduction to DemandBlue’s Salesforce Marketing Cloud Accelerators
Marketing Cloud is one of the most prominent and widely used marketing platforms on the market. However, simply implementing Marketing Cloud for your firm isn’t easy. With…
Integrating Salesforce Service Cloud and Jira
Faster Case Resolution. Upgraded Service Experience. Upgraded Service Experience. A Salesforce-native connector that seamlessly integrates all standard and custom Salesforce Object with Jira products like…
Document Generation in Salesforce with Nintex DocGen
Nintex is powerful document generation tool comes with how to generate a document for data and also manage them. Salesforce is World No.1 CRM so…
Popular Salesforce Videos
Installation & Configuration Process of Salesforce 9Calendar
This video demonstrates the installation, configuration, and working of our latest Salesforce app 9Calendar. Watch this video till the end to understand its functionalities. Adding…
Alias Tags and Tracking in Salesforce Marketing Cloud
Cameron Robert from Datarati demonstrates how the Alias tag works in Salesforce Marketing Cloud, and how you can use it to improve your email tracking…
How UiPath Robots Upload Files to Salesforce
How #UiPath Robots upload files to #Salesforce and assign to #Case without custom activity just RAW REST API. 0:00 Preview0:55 Intro1:20 Logic in one picture1:38…