-
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
Salesforce AI + Data : Transforming Business
In today’s hyper-connected digital landscape, the fusion of AI and data is driving the next wave of business transformation. Salesforce, the world’s leading CRM platform,…
10 Reasons You Need a Salesforce Support and Maintenance Partner in 2021
The secret behind the selection of Salesforce maintenance for supervising the marketing processes lies since it assists in improving the business continuously and manages the customer's contentment efficiently. Support…
Syna World Windbreaker: Where Streetwear Style Meets Everyday Performance
In modern fashion, outerwear has evolved beyond basic protection. Today, jackets and windbreakers represent personality, confidence, and lifestyle. The Syna World Windbreaker is a perfect…
Popular Salesforce Videos
Salesforce Billing and Cryptocurrency
THE GOAL: In this video, you're going to learn how Cryptocurrencies can work with Salesforce Billing. ☝️ BEFORE YOU BEGIN, KNOW THIS: 1. In terms…
How to Crack Salesforce Platform Developer I Exam in 2021?
Salesforce Platform Developer I Certification Training ensures that you master the concepts and components of application development on the Salesforce platform. Watch this video and…
Salesforce Data Loader | Import Relational Data
What is Data Loader and How to use it to import or export data to or from Salesforce? 00:00 What is Data Loader 01:00 How…