Questions tagged [emailmessage]

Represents an email in Salesforce.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
27 views

Email-to-case create duplicate EmailMessage

When I send an email to two or more email service address, duplicate EmailMessages are created in the environment, one for each email service address. I want that only EmailMessage and one case are ...
0 votes
0 answers
22 views

Filtering auto reply and out of office EmailMessage

I want to filter out all emails that is from auto reply and out of office emails. Is it safe to filter out auto reply emails by checking the Headers on EmailMessage if it contains Auto-Submitted: auto-...
0 votes
1 answer
35 views

send email even with addError (platform event)

I need help to understanding why I can't send email even using platform event (publish immediately). The business logic is to prevent duplicated lead basead on a field, show an error message in the UI ...
  • 3
0 votes
1 answer
42 views

Clone Created Date of Email Message with Apex

I'm trying to clone a row of an EmailMessage object to store the Created Date field with its original value. I am using the clone() Apex method https://developer.salesforce.com/docs/atlas.en-us....
  • 45
1 vote
0 answers
29 views

an email can't have more than 1 sender on EmailMessageRelation object

I am trying to import EmailMessage from one org to another. I am following instructions on this page here https://help.salesforce.com/s/articleView?id=000380515&type=1 I am on step C1 and where I ...
1 vote
0 answers
42 views

Prevent sending duplicate email message in Case using Email related list

Is there a way to prevent the Users from sending a duplicate email from Case Email related list? I already checked a Salesforce article regarding this. I want to make the Send button to be disabled ...
  • 11
0 votes
2 answers
47 views

Is there a way to make this apex more performant?

I have a class I am working on that will export a CSV that includes "Case Number", and "Last Outbound Customer Activity Date". There is some logic included in my Apex that ...
0 votes
0 answers
105 views

Filling custom fields when sending emails

Although custom fields can be added to the standard EmailMessage object, there does not seem to be any way to populate these fields when sending an Email using the Messaging.SingleEmailMessage class. ...
0 votes
1 answer
151 views

Sent emails not visible under Task object in salesforce Lightning

I created a flow which triggers when a task is closed and sents an email through email action. The flow is working and email is received in mail box but I cannot find the sent emails in salesforce ...
-1 votes
2 answers
35 views

Email-to-case vs OWA

I've recently added new email addresses to email-to-case. These email addresses are now available to all the people in the org as 'from' addresses when they send an email to the customer. I tried to ...
0 votes
1 answer
113 views

Getting a component error in Lightning when a user edits Case on detail page

A user is getting this error every time they try to make an edit on their detail page on a case record: [LWC component's @wire target property or method threw an error during value provisioning. ...
0 votes
0 answers
697 views

Record trigger flow not working for case and email message object

I have working to convert the workflows into flow for the below scenario with Case and email message objects. But its does not triggering properly and am not get the result. Am not sure where the ...
0 votes
0 answers
1k views

Record triggered flow not working for email message and case object to update the owner ID

I have working to convert the workflow into flow for the below scenario. But Am not sure, Why its not triggering, where I done the mistakes and why its hanging to trigger the flow. Please see the ...
0 votes
1 answer
800 views

How to update the fields in Case object once sent the email from email message

I have working to convert the workflow into flow. But am stuck with connecting the parent and child objects which was email and case on while creating the flow. Am not aware how to connect these two ...
0 votes
1 answer
90 views

At exactly what point of execution are merge fields in EmailMessage resolved?

I want to create a custom logic that will copy the value of EmailMessage.Subject after the merge fields used in it get resolved. I tried to do it on the after insert trigger on EmailMessage object. ...
  • 378
0 votes
0 answers
164 views

save email message on multiple custom object

I need to save Email Messages on multiple and different custom objects. EmailMessageRelation is used only for Contact Lead or User. And I know I have a field inside Email Message: RelatedToId that can ...
  • 995
0 votes
0 answers
116 views

Messaging.sendEmail(mails) takes too much time for 1000+ mails

I needed to send bulk emails, Which would be anything between 1000-2000,Suppose 1500 for testing. I was using sendEmail(mails) method of Messaging Class Messaging.SendEmailResult[] resultMail = ...
0 votes
0 answers
417 views

Preview Lightning Email Template in Screen Flow

I try to preview a Lightning Email Template within a Screen Flow, so that the user can see it, before sending the Email via Flow. Currently, I have to rebuild every Email Template as a Text Template ...
0 votes
1 answer
220 views

Not able to create an EMAIL MESSAGE using SSJS in Marketing cloud?

I am trying to find a way to create an email with a click from the browser using Javascript client side & server side ( AJAX ), but now having issues with SSJS, I tried to retrieve the id of the ...
  • 155
0 votes
0 answers
28 views

Is it possible to create a templated based email message using only ampscript?

Is it possible to do that, creating a script where we can set up the name of our email message and pick the template based on its id o something, then create it in the content builder ? with only a ...
  • 155
0 votes
0 answers
232 views

Email to Case - Object EmailMessage - Field From Address not fill with route email

I have email to case configured, and all works fine, besides the object "Email Message" when in some occasions when a user try to respond a email the "From Address" field is fill ...
user avatar
0 votes
0 answers
84 views

how can i choose one email from all email Map list?

I'm just starting with salesforce and need some help. I need to get one related email from Map email list. I manage to get all emails with this query, but don't know how to get one I needed. Any help ...
  • 3
0 votes
0 answers
72 views

How to Group EmailMessages using ThreadIdentifier in Activity TimeLine

I have exported historic emails from external system to Salesforce. Though, the ThreadIdentifier field is common for EmailMEssage records in SF, they are showing as Individual message/email but not ...
  • 1,519
0 votes
1 answer
99 views

How to solve : FATAL_ERROR System.FinalException: Cannot modify a collection while it is being iterated

My Goal is to remove certain email address from To when user click on Reply All Map<Id, EmailConfiguration__c> mapEconf = C3S_EM_EmailConfiguration.getAllEmailConfigsByIds(); List&...
user avatar
0 votes
1 answer
492 views

EmailMessage Bounce Reason. How to find it from the email, not associated to a Contact/Lead/Person Account?

On a Contact/Lead/Person Account object there is an "EmailBouncedReason" field along with an "IsEmailBounced" field, which makes it possible to understand a cause and fix it. But ...
3 votes
3 answers
2k views

Salesforce Storage Issue - Hitting Data Storage Limits with Email Messages

We continue to have our data cap hit for Salesforce data. Prior to spending more on storage, I want to ensure I am doing my due diligence. We just purchased 3 more units of storage last month that ...
0 votes
1 answer
609 views

When file is uploaded need to send an email with attachment with file format

I have a task that when i upload a file with excel or pdf or any format at that time it have to send an email with attachment with the file type which i upload . Below is my code:- trigger ...
0 votes
1 answer
292 views

Case.SourceID does not exist? Determining if EmailMessage record created the case

In one org, I have used Case.SourceID (queried SELECT Parent.SourceId FROM EmailMessage), which would tell me the ID of the EmailMessage that was the original case origin email. In another org, the ...
  • 838
1 vote
3 answers
7k views

Get record type developer name in Flow instead of RecordTypeID

I am creating a flow on EmailMessage object. I want to retrieve the record type name in the flow instead of RecordTypeID. Is there any way to get the name instead of ID?
0 votes
1 answer
639 views

salesforce Dataloader : field 'Description' can not be filtered in a query call

I am using dataloader to look for and extract certain emails(tasks) that must have the word "igloo" in them, I tried to do 'description' contains "igloo" and got an error saying ...
1 vote
0 answers
168 views

Winter 21 release ''Disabled Ref ID and New Threading Behavior for Email-To-Case" [closed]

When I enabled this critical update on my sandbox, I am facing some issues even though I have disabled it. The issues are as follows: 1.The auto-response email is missing under the case feed. 2....
1 vote
1 answer
1k views

EmailMessage not showing on lead's Activity Timeline

I am trying to log an email message on a lead/contact. The EmailMessage is getting logged correctly but it's not showing on the Activity Timeline for the lead/contact. EmailMessage m = new ...
  • 3,866
0 votes
1 answer
712 views

How to associate EmailMessage with Lead record using apex?

I am creating a new EmailMessage record from my apex code and I want that this record should be associated to a Lead record. As per documentation, we can not use RelatedToId RelatedToId : The ...
  • 2,510
0 votes
1 answer
178 views

Inbound eMail Handler - monitor incoming mails

I add a inbound email handler into my org to add a new record in a custom object (bt). Sometime the mails are not processed and I don't know why. Is there a way to check the incoming mails in ...
  • 451
0 votes
1 answer
410 views

What types of e-mails are counted against the daily SingleEmailMessage Limit?

I tried googling but couldn’t find a clear answer to what all emails that are sent from Salesforce count against the SingleEmailLimit of 5000 per day. Does workflow rule e-mail alerts count against ...
0 votes
1 answer
141 views

EmailMessage Data Storage Isuue in Production

Currently we are facing storage issue in the production org. EmailMessage has consumed most of the data storage there. As of now we don't want to store the old data to another storage as client need ...
0 votes
0 answers
115 views

Can historical EmailMessageRelation records be migrated? (CreatedDate is not writeable even with relevant permissions)

I am unclear how one can migrate EmailMessageRelation records because the 'CreatedDate' field is not writeable even with the relevant permissions ('Edit access on Read Only fields' and 'System Audit ...
0 votes
1 answer
1k views

EmailMessage object access in Case Trigger after insert

Of course people will suggest to use EmailMessage trigger but if I update case from there then the problem is in case auto response rule as our requirement is mainly to fire the autoreply after the ...
0 votes
1 answer
630 views

Query Case Record Type Name for the Parent Case of an Email Message in SF

I want to query the Case Record Type Name for the Parent Case of an Email Message. I am trying with the below query but it is not returning me the name :- select id,subject,parentid,parent....
0 votes
1 answer
221 views

After Insert Trigger on Email Message to Update a field on Case [duplicate]

I have one custom checkbox field on Case named Check__c and I want it to be checked if the From Address of the incoming email message linked to that case is equal to the Case Owner's email. there is ...
3 votes
1 answer
218 views

Impossible to test Task created from Messaging.sendEmail?

I have added some fields for Compliance to EmailMessage and Campaign objects. When a list email is sent, a batch job finds the tasks and copies those fields from the campaign related to the list email....
  • 322
0 votes
0 answers
836 views

Set EmailMessage Visibility

I have two users who share the same profile and have access to Cases. When one user sends an Email to the Case's Contact from the "Activity Composer" an EmailMessage appears in the Email ...
0 votes
1 answer
1k views

Receiving ILLEGAL_OPERATION error on EmailMessage Update from ContentDocumentLink trigger

I've been trying to make a fix for a known error when logging emails from the Outlook integration where embedded images display as broken links in the feed. My solution for this would be a trigger ...
0 votes
1 answer
929 views

EmailMessage HasAttachment and Files

Is there a way to create an EmailMessage record with an associated File/ContentVersion AND set HasAttachment when created via Apex? Same example code in this question, however the only answer there is ...
  • 5,275
0 votes
0 answers
573 views

How to change the From the emailmessage before sending the email via apex?

When I change the ValidatedFromAddress in the before the emailmessage trigger it goes back to the user's email. The email received comes from the user and not from the changed email. Can you tell me ...
0 votes
1 answer
153 views

Can't get attachment data from outbound email via Apex

Has anybody got experience or ideas how I can resolve the following issue please? We're trying to query attachments sent via outbound email from the email related list on case, so that we can copy the ...
0 votes
1 answer
381 views

How get Lead Id in apex trigger

When sending an email from the lead screen. Is it possible to get the lead id in the before of the EmailMessage trigger?
0 votes
0 answers
473 views

Object Permissions on EmailMessage Object

No object level permissions appear to exist for the EmailMessage object is this true?
0 votes
0 answers
769 views

Marketing cloud custom font usage

Hi have the font file with otf extension. Can any one give me a clear steps to upload in marketing cloud and use this in email templates.
0 votes
1 answer
223 views

How to reference RecordTypeId via RelatedToId for EmailMessage

can anyone please shed some light on how to reference the RecordTypeId of the record related to an EmailMessage via the RelatedToId field? I would like to update the IsExternallyVisible field based ...
  • 11