• Vishwajeet Pandey
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
New to Salesforce so I'm sorry if this is a dumb question. But I'm trying to write a trigger to help set some required fields on our Case object when we receive an email using email to case. I just can't understand why the trigger isn't firing in my debug logs.
 
trigger TestEmail2Case on EmailMessage (before insert, before update) {
    for(EmailMessage e : trigger.new) {
        system.debug(LoggingLevel.INFO, '>>>>> email:' + e);
    }		
}

​I've read a couple other instances of people using the before insert on email message to help tie into email to case but it just doesn't seem to be firing for me. Any help would be apprecited. Thanks!