Activity Forums Salesforce® Discussions WhoID is null when send email in sandbox on Contacts

  • WhoID is null when send email in sandbox on Contacts

    Posted by jitesh on August 1, 2016 at 3:33 pm

    I have created a trigger on task (before Insert) and just displaying the 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 :{
    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.

    Abhinav replied 6 years, 2 months ago 2 Members · 1 Reply
  • 1 Reply
  • Abhinav

    August 5, 2016 at 11:29 am

    Hi Jitesh,

    This is the wiered case. You may have to contact to the salesforce support. Or through log a case.


Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos

Salesforce Interview Questions and Answers - For Freshers and Experienced Candidates

Video in

Learn most important Salesforce Interview Questions and Answers, asked at every interview. These Interview questions will be useful to all entry-level candidates, beginners, interns, and…