-
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
No Code Salesforce and Asana Integration
Lead generation, follow-up, and admin tasks keep sales teams engaged. Most reps are multitasking multiple profiles at the same time, dealing with lead qualification, pre-deal…
Custom Notification With Process Builder in Salesforce
Custom Notification is a modified notification where the administrator can add beneficiaries, subjects, and substances. Administrators can be sent a custom notification when any significant…
Top 8 Highlights of Dreamforce 2018
It’s been exactly a week since the biggest tech learning event in the world and we’re still soaking in all the events that made Dreamforce…
Popular Salesforce Videos
Is Salesforce A Good Career Path?
Join this useful group for Salesforce job & career info: https://tinyurl.com/TelegramIntelogik Contact us for any Salesforce career guidance. Watch this video and learn. do let…
How To Create Permission Set Group | Salesforce Development Tutorial
How to create permission set groups. This video will cover the following points - 1. Introduction Get a brief introduction about Permission Set Groups. 2.…
What is Salesforce Hyperforce?
In this video, you will take a look at Salesforce Hyperforce, Salesforce's new re-architecting of the Salesforce platform. 00:00 Introduction 00:28 What is Salesforce Hyperforce?…