• varalaksshmi rajendran
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

 

I need to parse the content of an attachment on client record and look for a keyword. I am trying to do this in a after insert trigger on Attachment without success so far. The attachement is an outlook email saved as .msg file. 

 

Here is partial code. 

 

for (Attachment E : trigger.new) { 

String parentObj = E.ParentID;

blob attBody = EncodingUtil.base64Decode(E.Body.toString()) ;

String aContent = aBody.toString();

 

 

Wondering is it possible read contents of a .msg attachement. I was able to read text and csv attachments. 

 

I would really appreaciate some sample code or any other help on this.