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 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.

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

    Member
    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.

     

    • This reply was modified 7 years, 8 months ago by  Abhinav.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos