Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [email-template]

Salesforce email templates come in a variety of shapes and sizes, ranging from Text to Visualforce. These email templates can be used through Salesforce through approval processes, workflows, etc to send email to users.

0
votes
2answers
33 views

Error: Invalid field 'size' for SObject 'OpportunityLineItem'

I would like to check the size of the OpportunityLineItem related list in a Visualforce Email Template like below, where relatedTo is an Opportunity <apex:outputPanel rendered="{!relatedTo....
0
votes
0answers
12 views

Email Template not printing the picklist value

{! IF( ISPICKVAL( Opportunity.Transaction_Type__c,'IP - Tensilica'), Opportunity.Billing_Plan__c , 'Else Test')} -Here 'Opportunity.Billing_Plan__c' is a Pick list value, An Email Template is not ...
0
votes
1answer
21 views

Use 'ContactEmail' field of case in email template

I need to access value of contact email in email template using case object.'ContactEmail' is a standard case field is alredy availble, I am not able to see this field in case merge fileds. Even if I ...
0
votes
0answers
20 views

TEXT Email Template for Line Break? [duplicate]

! IF( ISPICKVAL( Opportunity.Transaction_Type__c,'IP - Tensilica'), 'TCV (USD) (<= $250K for FastTrack): $' & TEXT(Opportunity.TCV__c) & ' **\r\n**Term (months) (<=12 for FastTrack): ' &...
0
votes
0answers
18 views

How to send EmailMessage with emailtemplate object and associate to Case? [closed]

How to send EmailMessage with emailtemplate object and associate to Case ? There is requirement to send mail with selected email template that should reflect in email object for particular case ...
1
vote
1answer
28 views

Using Custom Metadata Type in Email Template

I am wondering to know if it is possible to use a Custom Metadata Type inside an Email Template. I'm moving from Custom Setting to Custom Metadata Type and this feature could be great. Regarding the ...
1
vote
1answer
25 views

Custom Font not working In Custom HTML email template

I have created static resource and included ttf file for gotham font, when I used below code in visualforce page it is rendering as expected. but when same I included in custom html email template it ...
0
votes
1answer
43 views

Variable not defined on Data Extension but able to print it in content

For parsing variables for the respective values on the email content html blocks, I usually have 2 kinds of variables. The first case. The variable is defined on the sendable Data Extension. The ...
0
votes
0answers
14 views

If condition in HTML email template not working. Weird

I have a HTML email template with IF loop which is not working. {!IF(NOT(ISNULL(pba__Closing__c.Buildings_survey_booked_To__c)),' to '+pba__Closing__c.Buildings_survey_booked_To__c,' ')} There is ...
0
votes
1answer
26 views

DocumentAttachmentMap Query for Attached File

I can attach a file to a Lightning emailTemplate using one of the emailTemplate editors in Salesforce but I have not been able to find the attachment record that makes this relationship possible. If,...
0
votes
1answer
30 views

Salesforce Marketing Cloud email template layout breaks when viewed in Outlook.com and Office 365

Usually I make emails handcoded, but one of my clients have started to use Salesforce Marketing Cloud, Email Studio. So I make templates intended for that system. But the layout breaks when viewed in ...
0
votes
0answers
10 views

HTML content is not allowing in HTML Email Templates with Letter head

I have the following code and its not allowing to create the email templete with the HTML body i gave String bdy = ' <table border="30px" cellpadding="0" cellspacing="0" id="topTable" style="...
0
votes
1answer
16 views

Lightning email template with logo

I am trying to figure out how to add a logo to a Lightning template so that it will span the width of the email. In Classic, I would create a letterhead & add an image of 550 width. Can someone ...
0
votes
0answers
34 views

Use a Custom Email Template for the Verification Method for Self-Reg Community User

I would know if we can use a Custom Email Template for the Verification Method (Email) when a new Community User is using the Self-Reg Page. Right now a standard email is sent including the Community ...
0
votes
0answers
12 views

Merge fields not getting substituted for actual values in Lightning email template

I have created one email template and I am using merge fields in this email template. Mail is getting sent with the correct template subject and body. However, merge fields are not getting substituted ...
0
votes
0answers
24 views

PDF Generation: Classic Email Template Content is counted in Salesforce Apex Code Limit?

We need to send PDF based on salesforce record. For this we have used Classic Email Template and Messaging.Singleemailmessage class to send PDF as attachment. We have used custom template for ...
1
vote
1answer
31 views

How to get Community Url in a Visualforce email template

Background I would like to display the Community Url within a visualforce email template. Standard templates use: {!Community_Url} But I cannot find an equivalent field for visualforce email ...
2
votes
0answers
22 views

Yes/Maybe/No buttons not appearing for ICS calendar visualforce email attachment

Background I am using <messaging:attachment to generate a .ics calendar invite as an attachment as part of a visualforce email template. <messaging:attachment filename="invite.ics" renderAs="...
0
votes
1answer
39 views

Email merge field is empty when email is being sent from Community

I have Reset Password email template with merge fields. When I test it from the org (clicking Send Test and Verify Merge Fields) the fields are populated. It works fine. But, when the community ...
3
votes
1answer
56 views

How to Upload Lightning, not Classic, EmailTemplates

I need to convert 200 classic emailtemplates to lightning templates and I've encountered an obstacle. When I insert templates with lightning markup using SOQL and identical field values to an existing ...
1
vote
1answer
34 views

Can I send an email without sharing?

I'm trying to send some emails using the Messaging API. I'm constructing instances of Messaging.SingleEmailMessage, setting the values of whatId, whoId, and templateId, and then sending through ...
0
votes
0answers
16 views

Richtext Field contains GIF image

I have richtext field(crich__c) that contains gif image in salesforce. When created an email template and merge my richtextfield it doesnt show.
0
votes
0answers
7 views

Limit certain cells from editing in Free Form Components

I have set up a HTML E-Mail Template with a set of components all done with HTML as Free Forms so editors can change the contents. However I have an issues I am not sure how to solve: I have a ...
2
votes
1answer
85 views

How do I retrieve email templates from a sandbox using sfdx

Is it possible to retrieve email templates using sfdx? I would assume that I could get them using sfdx force:source:retrieve -m EmailTemplate:Folder/TemplateName but everything I try results in === ...
0
votes
1answer
74 views

SendEmail failed. First exception on row 0; first error: INVALID_ID_FIELD, WhatId is not available for sending emails to UserIds.:

Error: SendEmail failed. First exception on row 0; first error: INVALID_ID_FIELD, WhatId is not available for sending emails to UserIds. I want to send email through the snippet in below. List < ...
0
votes
1answer
22 views

Formatting Time after clocks change

Background I have a simple apex function which returns a date time formatted using a time zone: public String getFormattedDatetime() { TimeZone tz = UserInfo.getTimeZone(); return ...
0
votes
1answer
57 views

Dynamically replace merge fields from an Email Template in Apex?

I want to replace the merge fields in my email templates with values I have in my class, with the intention of serving them in the front end for users to further edit. My template looks like this: ...
0
votes
0answers
11 views

VF Email template not including child records when sent from trigger

Below is my VF email template which includes all child records when I use preview functionality in salesforce, but doesn't include child records value when sending it through trigger. <messaging:...
0
votes
0answers
29 views

HTML Template Rendering in Lightning Rich Text Field for Email

I built a custom email component using <lightning:inputRichText... for the email body. However, the rich text editor does a poor job of rendering anything but text. When I load an HTML template, ...
0
votes
0answers
26 views

How to send a single mail with List of Strings as a merge field

/** * @description To send an Email when Additional Documents are added * @param valueSet * @param oppId * @param stageName */ @AuraEnabled public static void ...
-1
votes
1answer
34 views

Considerations before using the 4 types email templates [closed]

What are the differences of the 4 email template type (Text, Custom, HTML, Visualforce)? and when should I use them? Thank you.
0
votes
0answers
9 views

Modify Email Sent When User Added to a Community Group

I want to modify the email template that is used when a new user is added to a Community group. I am not seeing the template. Please let me know the name of the template and where I can find it. ...
1
vote
1answer
34 views

E-mail template losing formatting APEX

I created an Email template in classic. However, When I send this email via send test and verify merge fields I get the display as show in the HTML preview. However, when I send the e-mail via apex ...
0
votes
1answer
59 views

HTML template in marketing cloud

I created a template in marketing cloud using own html. While editing this template, in the layout view 'block', 'content' and 'layout' everything is non usable/editable and I can edit the template ...
0
votes
1answer
25 views

Star Rating not rendering on custom HTML email in Marketing Cloud [closed]

We have created an email in Marketing cloud using an existing Blank template where we can drop our custom made content blocks. And for one email we have a requirement where we need to capture the ...
0
votes
0answers
18 views

Searching email templates

I am needing to find a way to find all email templates in my org that havent been used in the last X amount of time (not sure on exact date or # of months yet). Is there a way i can either just use a ...
0
votes
0answers
22 views

Process Builder run After update

I want to run process builder after records updated. For this, I have written formula into PB. AND(NOT(ISNEW()) ,NOT( ISNULL( [Payment__c].Payers_Email__c) ),[Payment__c].Payment_Email_Sent__c=true) ...
0
votes
1answer
17 views

Using SingleEmailMessage to send email with template to an email that might or might not be a contact

Normally to send an email with a template this is how you would do it. Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); mail.setTargetObjectId(contact); mail....
0
votes
0answers
14 views

How to use static resource image in visualforce email template editor

I am using a public site and a public static resource to add images to a visualforce email template. But when I use this code: <img src="http://example.force.com/email/{!$Resource.logo_300}" ...
0
votes
1answer
17 views

Issue with Email Alert in the field 'from email address'

I'm trying to create an email alert for notifying the case submitter through email. I've set up email-to-case automation and now I'm working on the response email. I'm stuck at the 'from email address'...
0
votes
0answers
46 views

{!ApprovalRequest.Internal_URL} in a Visualforce Email that is using a different related to object?

I'm creating an email template for an approval request and it is related to our quote object. When I try to use {!ApprovalRequest.Internal_URL} to get the URL to link out to the quote, it doesn't ...
1
vote
1answer
56 views

Capture Survey Response from an Email and store answers into a Data Extension

Is there a way that we can create a survey in the Email and capture the customer responses in the Data Extension? I'm looking for a solution for it, and found out that Surveys are no longer ...
1
vote
1answer
67 views

Lightning Email Templates Deployment

I have been reviewing the documentation for Lightning Email Templates and it does not look like they can be deployed from one org to another. I have been unsuccessful retrieving them from the Metadata ...
0
votes
1answer
31 views

AMPscript not woring in email body

This maybe a silly question as i am totally unknown to the AMPscript. I am trying to get date in the email body so wrote the following code, but when sent out test emails, the code was not replaced ...
0
votes
0answers
26 views

Wrong Email Template is being sent from the community after password reset 5 times

We have a Community with Customer Service template. There are Custom Templates for Emails like Welcome, Forgot/Change Password, etc. Please check the image below. All emails are being sent with the ...
0
votes
1answer
11 views

Email Templates from a Packaged folder could not be found

I wanted to lookup an email template in my apex code. I tried to execute first an SOSL to check if I can find it, like FIND {Generic} IN NAME FIELDS RETURNING EmailTemplate(Name) But it only gets ...
0
votes
0answers
15 views

Need to show comma in subject line of custom visual-force email template for amount field

I have a requirement where I need to show an amount field in subject line of the email template and that template is custom visual-force page since I also need to show line items data . When the alert ...
1
vote
1answer
180 views

Lightning Email Templates: Custom Merge Fields

Is there anyway to reference a custom object field when creating a Lightning Email Template or are we limited to the options in merge field picker? I believe it is the latter, but want to verify. ...
1
vote
1answer
98 views

Email to Case (Using thread Id)

I am working on email to case. My requirement is whenever a user is sending mail from outside to salesforce generated email address, case should be created and reply back to user with case id in ...
0
votes
1answer
231 views

SendEmail failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, java.lang.NullPointerException: []

I am getting this error message: Message: SendEmail failed. First exception on row 0; first error: UNKNOWN_EXCEPTION, java.lang.NullPointerException: [] Stack Trace: Class.MessagingHelper.send: ...