-
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
Seamless Salesforce Data Migration Solution for Nested Parent-Child Relationships with iSyncSF
Introduction Data migration is a critical process for businesses transitioning to Salesforce or consolidating their existing data within the platform. Salesforce offers a robust platform…
Sneak Peek: Latest Features And Updates of Salesforce commerce Cloud
With rising customer expectations in a tech-savvy marketplace, it has become critical for retailers to deliver top-shelf shopping experiences to stay relevant and competitive in…
Salesforce to MySQL: Steps to Integrate Data Easily
Are you attempting to connect Salesforce to MySQL? If so, you've arrived at the right. Salesforce seems to be a virtualized Customer Management (CRM) technology…
Popular Salesforce Videos
Introduction to Cloud Pages in Salesforce Marketing Cloud
Cameron Robert from Datarati introduces the Cloud Pages function in Salesforce Marketing Cloud and talks through the different Cloud Page types and how they can be…
Salesforce Online Training Videos For Beginners | Campaign Management
Learn all about the Salesforce campaign management in this video. Watch and learn. If you have any doubts or questions, please let us know in…
How To Drive More Sales With Marketing Automation in 2023 | Marketing Cloud | Webinar
Are you curious about how to drive more sales for your business? Every business wants to create a market space for its business or product.…