I need to get attachments when trigger on EmailMessage executes.

How do I find them?

Edit: The EmailMessage is created via Lightning for Outlook plugin.

  • emailmessage related to what? Cases? your question is not very clear, additionally what have you tried and/or researched? please update your post accordingly, thanks
    – glls
    Oct 12, 2017 at 0:11
  • @glls EmailMessage is created via Lightning for Outlook. A task is usually created, tho I do not find it super relevant.
    – dzh
    Oct 12, 2017 at 0:20

1 Answer 1


Found it. It's ContentDocumentLink.ContentDocumentId.


SELECT Id, LinkedEntityId, ContentDocumentId, IsDeleted, SystemModstamp, ShareType, Visibility FROM ContentDocumentLink where LinkedEntityId = '02s550000012345678'

02s550000012345678 is EmailMessage id.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .