• Bhuvaneswary Radhakrishnan
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 4
    Replies
I have a logic in EmailMessage trigger to create a new case when customer replies to a closed case. If the case is closed, I am cloning the case record to create new case. Since we cannot reparent EmailMessage I am cloning the EmailMessage as well and updating ParentId as new case id.
I am facing issue when the email has attachments (images).
Original EmailMessage has below values: HasAttachment=true and HtmlBody contains <img src="cid:ii_kq0csi6n2" alt="image.png" width="225" height="225">
I am using emailMessage.clone(false, true, false, false) to clone the record and the cloned record has same values as original which are HasAttachment=true and HtmlBody contains <img src="cid:ii_kq0csi6n2" alt="image.png" width="225" height="225">
After inserting cloned record, when I check onbeforeinsert execution for cloned record, HasAttachment becomes false and it doesn't create any attachment for cloned EmailMessage record. Cloned EmailMessage img tag in HtmlBody still have src attribute as "cid:ii_kq0csi6n2" instead FileDownload url of attachment record.
Is there anything missing the approach of cloning EmailMessage?
Can someone help me to understand how salesforce identify to create attachment record for an EmailMessage contains image in the htmlbody?
Thanks in advance.
I have a logic in EmailMessage trigger to create a new case when customer replies to a closed case. If the case is closed, I am cloning the case record to create new case. Since we cannot reparent EmailMessage I am cloning the EmailMessage as well and updating ParentId as new case id.
I am facing issue when the email has attachments (images).
Original EmailMessage has below values: HasAttachment=true and HtmlBody contains <img src="cid:ii_kq0csi6n2" alt="image.png" width="225" height="225">
I am using emailMessage.clone(false, true, false, false) to clone the record and the cloned record has same values as original which are HasAttachment=true and HtmlBody contains <img src="cid:ii_kq0csi6n2" alt="image.png" width="225" height="225">
After inserting cloned record, when I check onbeforeinsert execution for cloned record, HasAttachment becomes false and it doesn't create any attachment for cloned EmailMessage record. Cloned EmailMessage img tag in HtmlBody still have src attribute as "cid:ii_kq0csi6n2" instead FileDownload url of attachment record.
Is there anything missing the approach of cloning EmailMessage?
Can someone help me to understand how salesforce identify to create attachment record for an EmailMessage contains image in the htmlbody?
Thanks in advance.
Hi All,
Currently I see the following sub tabs in Chatter feed.
 'All Updates', 'Emails','Call Logs', 'Text Posts', 'Status Change'

User-added image
Is there a way to supress some of the tabs .e.g supress 'Call Logs' tab ?

Regards,
Avinash
I am doing this trail head module :
https://trailhead.salesforce.com/content/learn/projects/quickstart-vscode-salesforce/vscode-salesforce-ready?trail_id=force_com_dev_beginner

when trying to install the CLI through the installer, I get the error 
'The requested operation requires elevation'
  • June 25, 2019
  • Like
  • 0
Hello there,

I am having a requirement  when email is sent from out look to  salesforce with some attachments (Like word doc or Image ect) the trigger on EmailMessage should create a case in salesforce and attach the attachments of email to as Notes and Attachments.

I am able to create the case but  unable to attach the attachment to case. :( can any one please help me on this issue .
I need to finish this task as soon as possible.

Thank you :)
 
  • January 12, 2016
  • Like
  • 0