Questions tagged [emailmessage]

Represents an email in Salesforce.

Filter by
Sorted by
Tagged with
0
votes
0answers
9 views

Lightning component Service Console, get and edit content of Quick Action Email Message

im trying to develop one Lightning Component for Service Console who is in charge of GET\EDIT entire\parts of Email in Case Management Quick Actions (screenshot) when the user click on the button of ...
0
votes
0answers
13 views

Relationship between FeedItem and EmailMessage [closed]

I need to create custom component to Show Feeds on Case, I need to manage EmailMessageEvent, I have looked on and found that All Emails are stored in EmailMessage object and all feeds stored in ...
0
votes
0answers
10 views

Tie Email Responses back to Lead Object

I am attempting to allow users from my company's sales department to email potential customers from a lead in service cloud, then if the customer replies to their email i need to display the email ...
0
votes
0answers
8 views

How to auto populate CPQ Quote in Email Message object Related To lookup field?

I have created CPQ Quote in my edition. Based on my requirement i need to send listed Quote data in selected Template using Email Message. Once clicked save & Email Button in Send an email screen ...
1
vote
1answer
25 views

RelatedToId field on EmailMessage Not Writeable

I am getting this response 'Field is not writeable: EmailMessage.RelatedToId' Email trigger helper method is the following: public static void parseEmailSubjectForLeadRelation(List<EmailMessage&...
0
votes
0answers
32 views

Parse Outgoing Emails (through Salesforce email composer) to change body's font style and embed a Signature

I would like to know if accessing outgoing emails before they go out of the system is possible. We want to get rid of default Salesforce signature and embed one of our own in all the outgoing emails. ...
0
votes
0answers
35 views

How to add cc & bcc in Messaging.SingleEmailMessage Email and simultaneously avoid single Email limit being hit

My requirement is to send single email with To/Cc/Bcc added. All the email Ids belong to internal users. Initially, when I was passing the User.Id to these methods, I was hitting the Single Email ...
2
votes
1answer
52 views

SLEEPY Error on Encryption?

We are in the process of encrypting fields in Production to accomodate PII regulations. This is going well for most fields, but today we encountered an issue with the EmailMessage object. In multiple ...
0
votes
1answer
31 views

Too many Email Invocations: 11 with List<Messaging.SingleEmailMessage>

I have a Schedulable class that I execute every day. I get some accounts that accomplish some conditions and then I create a email for everyone of this records into a List, but I'm getting this error. ...
1
vote
1answer
25 views

Case Status Changing from Email Message Workflow not working

I've tried creating a simple workflow to change the case status from "Resolved" to "Reopened" when a customer replied to the case. I've found a few guides online to do this but for some reason it ...
0
votes
0answers
23 views

Using MassEmailMessage is not saving EmailMessage records

I'm a developer, and I just did some work using MassEmailMessage on Case records (with the related Contact being the recipient). During testing I noticed that it's not saving any sort of EmailMessage ...
0
votes
1answer
19 views

Email retention and Archiving timelines

Is there any limit/retention Period for storage of EmailMessage records by Salesforce or Archiving Criteria after which it will not be available and how to access Archived records. Regards, Prabhat ...
0
votes
0answers
13 views

What is the “Other Related People” related list in Email Message page?

I don't understand what it is and how it should be populated. It remains blank regardless of what I use as recipient, cc, and bcc (Users, Contacts, email addresses, etc.).
2
votes
1answer
26 views

How can I write a test that involves accessing the EmailMessage.ActivityId field?

I have some code that involves the following SOQL query: EmailMessage emailMessage = [SELECT Id FROM EmailMessage WHERE ActivityId =: task.Id]; In order to write a test for this code, the test setup ...
0
votes
0answers
38 views

Reply EmailMessage using SimpleEmailMessage apex class

In an Email-To-Case process, after receiving an email, a Case and an EmailMessage (A) are created. When the case is updated and a condition is verified, a "reply" email (related to Case and to the ...
0
votes
0answers
23 views

DELETE Email message from Production org

So as my title says i want to delete all Email Message from my production org. But when i referred this two links Link1 Link2 I am still unsure if there was any solution that had closed this issue....
2
votes
0answers
39 views

ParentId on EmailMessage is not writable?

We have a business scenario where an incoming EmailMessage sent to a closed Case, should be automatically reparented to another case that's Opened. The logic would achieve this by modifying the ...
0
votes
1answer
53 views

Unable to Query IsPrivateDraft in EmailMessage through data loader or REST API

We are trying to get the data from EmailMessage and looking to have the fields IsPrivateDraft, LastOpenedDate, FirstOPenedDate; and while we can query these through developer console we are unable to ...
2
votes
1answer
44 views

Prevent attachment of Certain type while sending email

I have been trying to prevent an attachment of type pdf while sending emails within Cases. I create an email, attach a pdf document. The process builder fires on Email creation which in turn calls a ...
1
vote
1answer
66 views

Trigger on EmailMessage to capture when an email is opened

Is there a way to capture the opening of an email sent as an activty of the opportunity object for example? I wrote a trigger on EmailMessagge (after update) but is not invoked.
0
votes
0answers
15 views

Sending Email from Case to a contact on which you don't have access

I promise all the following questions are very closely related to answer the question What happens when the case owner tries to send email from Case (via feed) if the case owner does not have access ...
1
vote
0answers
28 views

EmailMessage.RelatedToId not valid for Lead in Process Builder

My process runs 3 minutes after lead creation. It sends an email to the lead and logs the message in Email Message. Here's the error... Error Occurred: This error occurred when the flow tried to ...
0
votes
0answers
39 views

Attachments are not visible if setWhatId is not defined while email from Apex

I am sending email to selected Contacts (Custom Component) via Apex. User will also be attaching multiple files to the email. If setWhatId(setting it to Case) is defined, EmailMessage Activity shows ...
0
votes
2answers
32 views

Delete caseFeed when email message is deleted

I would like to Delete casefeed whenever a email message is deleted. Current if I delete email message the mail record is getting deleted but still the case feed displaying in casefeed. (I Dont want ...
1
vote
0answers
65 views

RelatedToId field does not exist while deploying process builder

I have created a process builder where I am creating a new EmailMessage record when an email is sent. When I am deploying the Process builder, I got the below error, although, I have included ...
0
votes
0answers
23 views

Identify Last Created Email Related to Case (Received or Sent)

I am trying to identify the last (most recently created) email related to a specific case. My purpose is run queries on cases and then for related emails and only show the last created email related ...
0
votes
2answers
57 views

Trigger on Email message related to an opportunity optimization problem

I actually have some confusion with my code . i'm trying to create a trigger that fires when an emailMessage related to an opportunity is inserted. My code is fine but i was thinking that if my ...
0
votes
0answers
90 views

Update case record when Email Message Status changes

want to update a checkbox whenever related email message status gets updated From "New" to "Read". I tried with workflow and trigger, neither worked. Somewhere on Stackoverflow, I found Email ...
0
votes
0answers
32 views

Two EmailMessage same email. Why?

I send an email from apex from opportunity object to account. Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); mail.setSenderDisplayName('Test'); mail....
0
votes
1answer
46 views

Parsing / Displaying TextBody from EmailMessage

After querying an EmailMessage select id, subject, textbody from EmailMessage I get the following textbody value displayed when rendered to a Visualforce Page: Email reply --------------- ...
0
votes
1answer
46 views

How to check that the response email body contains some keyword and write logic based on the key words?

We need to write some logic to update the case fields based on the email response we get . and we need to omit some key words from the email response. I have writted below logic to avoid some keywords ...
0
votes
0answers
130 views

Add image on HTMLBody from Messaging.SingleEmailMessage

I'm putting an image from my salesforce org inside an HTMLBody FROM Messagin.SingleEmailMessage ('c.instance' is for my org instance. documentId and orgId for document record Id and internal org id): ...
0
votes
0answers
52 views

Test Email-to-Case with mass emails and EMailMessage trigger

We are working on an org where cases are generated via Email-to-Case and a trigger on EmailMessage is carrying out some processes. A batch job then in a 5 minute rhythm works on these generated cases ...
0
votes
0answers
28 views

Pushtopic for streaming api

I am currently trying to set up a stream api for email message. The problem I am currently having is that Pushtopics do not support email message(that I know of). Does anyone know of a work aound for ...
0
votes
1answer
273 views

“Reply All” , “Reply” and “Forward” buttons not visible in the Send Email Activity on an Apex generated email

I have an Email Service with an Apex class that creates a new EmailMessage object associating the sender with a Contact in the system and the recipient as a User. The email shows up correctly with all ...
2
votes
0answers
130 views

Migrating Email Messages from one salesforce org to another salesforce org

I exported EmailMessages and EmailMessageRelation from Source org and Imported it to Target Org. Lead Layout (Source Org) - I can see 2 related list 1. Activity History(when clicked opens outbound ...
2
votes
0answers
139 views

HtmlBody of on EmailMessage does not stay as set in before insert trigger

I'm trying to cut off email threading from EmailMessage. I try to do this in BEFORE INSERT trigger. Original email: Hello Tom, We saw your complaint. We are working on it. Gigasoft ...
1
vote
1answer
176 views

How to query contentversion to Email Message

We have integrated Salesfroce and our Support Page, and I have to send emailmessage via rest api along with attachment lies within the email, but I don't find a relateionship between Contentversion ...
0
votes
2answers
66 views

RelatedTo field of Email message

RelatedTo field has multiple lookups to various object for my instance its heavily populated as follows: Lookup(Contract,Campaign,Organization,Donation,Product,Asset,Case,Solution,Asset ...
1
vote
2answers
311 views

What happens when I delete the Task related to an EmailMessage?

We're looking for ways to get rid of some data in several orgs. One potential target would be the Task records that get created along with every EmailMessage. (I.e. the Tasks of which the Id is stored ...
1
vote
0answers
112 views

Understanding EmailMessage for Data Migration

As I attempt data migration from one Salesforce org to another, I am finding EmailMessage to be a very unnecessarily complicated object to understand. At one point I thought I understood that recent ...
2
votes
2answers
286 views

Sharing settings on accounts, cases, emails and attachments

We have a requirement in which we need to make some accounts private. We do this by flagging the account with a deleted field. This flag is used in our sharing settings. We are using the exact same ...
1
vote
1answer
403 views

In email coming from salesforce what is X-SFDC-EmailCategory

I would like to know what this statement means. X-SFDC-EmailCategory: caseCommentNotification
6
votes
1answer
913 views

How to create an EmailMessage record with DML having HasAttachment to be 'true'?

I'm creating EmailMessage records via DML EmailMessage createWhatEmail = new EmailMessage( Subject = 'test' ,Status = '3' ,ToAddress = 'heim@...
7
votes
1answer
743 views

How to get the Id of an EmailMessage after sending a SingleEmailMessage with Messaging.SendEmail()?

Is there any way to easily retrieve the Id of EmailMessage records after sending them via Messaging.SendEmail()? Messaging.SingleEmailMessage m = new Messaging.SingleEmailMessage(); m.setToAddresses( ...
15
votes
1answer
1k views

How to use an Apex Email Service to store emails on a record EXACTLY as Salesforce does?

I have used the Lightning Experience UI to send an Email from a Record Homepage via Activity-Tab. This looks like this (bottom-right!): Now I want (vice versa) to store an incoming email received by ...
3
votes
3answers
2k views

Different between RelatedToId vs ParentId In EmailMessage

I had task related to Email Message (email-to-case). When an email arrives on closed case object, Then i was have to clone the old case object & create new record on that with exact data and also ...
0
votes
1answer
86 views

“does not have an accessible email address.” - Error message when adding EmailMessageRelation

I'm trying to associate a Contact to a EmailMessage object using the EmailMessageRelation object, this issue is that I have many email fields on my Contact object and if I related to a Contact that ...
1
vote
0answers
159 views

Cannot query on IsPrivateDraft field of EmailMessage

I have a field named IsPrivateDraft in EmailMessage, I want to use that field for updating the draft EmailMessage. I want to know the value of this field but cannot use it in query. On using the field ...
1
vote
2answers
2k views

How to send email alert as email-to-case when case is closed?

I am able to send email alert when case is closed. But the email alert NOT showing in email messages at case related list: The email when case closed is marked as 'CASE CLOSED' in email subject: ...