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

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 5
    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
Hi Salesforce enthousiasts,

We are currently working on a Einstein bot, but we are facing difficulties tackling potential performance issues. Based on the dialog that the customer has with the bot, we know the Type of question the customer has. We want to save this information to the Case object, on the Type field. We want to run this flow when the chat is transferred to an agent - and not in each dialog - because it queries the Case object. 

Ideally we thus set variables during the chat, and finally push those values to the Case object at the end of the bot conversation. For example, custom had a question about Store and Opening Hours.

However we found that we cannot store values to a variable, using "Set Variable" in a Rule. Source Variable can only be Context Variables, and Destination variable not a value like you can when calling a flow.

User-added image

The current work around we have in place is that we call a flow with the custom value. This flow then just assigns the value and outputs back to the Einstein bot. The output is saved in the custom variable. When we transfer the chat to an agent, we then have a seperate flow that updates the fields on the Case object. This is not ideal - although we are not quering objects - because we are still calling many flows throughout the bot conversation.

User-added image

But this leads to running flows in almost all dialogs, which does not seem optimal. There must be a better way that I'm currently missing out on. Any idea how we can best tackle this problem? Thanks!
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'
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