You need to sign in to do that
Don't have an account?

How can I move Email attachment to a Case when Case Email has attachments?
is there cany way we can move Case Email Attachments to Case instaead of the Email via any Trigger?
I know when a Case Email is sent, it gets logged into EmailMessage, but my trigger on EmailMessage returns no Attachments, and my trigger on Attachment object does not fire at all, as if when Email attchments are inserted into Attachment it never triggers the attachment trigger.
Can anyone help me ... plz.
Sure. You'd have a trigger on Task. Determine if the WhatId of the Task is a Case. If it is, query the Attachment table based on the Task ID, and if Attachments are found, change the ParentId of each attachment to be the Case ID instead of the Task ID.
Hi,
I have created trigger on Task on after insert. but on Task i did not found attachment list so i am unable to update attachment parentid.
For each attachment in trigger, verify that the parent is an EmailMessage: Then pull your emailmessage records and verify the Email Message belongs to a case: IF that's the case, then set attachment ParentId to equal the email message ParentId.
That is: Before insert for each new attachment, if it belongs to an email and that email belongs to a case, update the attachment's ParentId to the caseID.