Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trigger EmailMessage_BeforeInsert on EmailMessage (before insert) {
- // Create list of EmailMessages
- Map<ID,EmailMessage> TR001EmailMessage = new Map<ID,EmailMessage>();
- /*************** TRIGGERS **************************/
- for(EmailMessage email :Trigger.new) {
- // For each inbound Email attached to a case
- if(email.Incoming) {
- TR001EmailMessage.put(email.ParentId, email);
- }
- }
- /*************** APEX CLASSES **************************/
- // For all Email check and discard auto response email (MUST BE FIRST METHOD)
- if(PAD.canTrigger('TR001_EmailMessage') && !TR001EmailMessage.isEmpty()) {
- TR001_EmailMessage.DetectCreationFromSpam(TR001EmailMessage);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement