• Reddivari Manjunath
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
Hi,
I am new salesforce and struggling with triggers.Now i am try to execute the sample trigger which was send mail  to mentioned email with description.below the code which i am working now.its executed successfully but not triggered the mail to mentioned mail.

trigger ExampleTrigger on Contact (after insert, after delete) {
     if (Trigger.isInsert) {
        Integer recordCount = Trigger.New.size();
         System.debug(':::countrecords:::'+recordCount);
        // Call a utility method from another class
        EmailManager.sendMail('emailtomanjur@gmail.com', 'Trailhead Trigger Tutorial', 
                    recordCount + ' contact(s) were inserted.');
    }
    else if (Trigger.isDelete) {
        // Process after delete
    }

}
Hi,
I am new salesforce and struggling with triggers.Now i am try to execute the sample trigger which was send mail  to mentioned email with description.below the code which i am working now.its executed successfully but not triggered the mail to mentioned mail.

trigger ExampleTrigger on Contact (after insert, after delete) {
     if (Trigger.isInsert) {
        Integer recordCount = Trigger.New.size();
         System.debug(':::countrecords:::'+recordCount);
        // Call a utility method from another class
        EmailManager.sendMail('emailtomanjur@gmail.com', 'Trailhead Trigger Tutorial', 
                    recordCount + ' contact(s) were inserted.');
    }
    else if (Trigger.isDelete) {
        // Process after delete
    }

}