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.

Filter by
Sorted by
Tagged with
4
votes
1answer
2k views

Pasting an image into the template of an outbound email

We are currently using the standard frame-based email templates which are supplied by SF. In one of our applications we occasionally need to manually create an email to send out to clients regarding a ...
6
votes
2answers
844 views

How to send an email before delete record using Email Template

I would like to send an email by using email template before delete a specific record. I'm using a before delete trigger and I receive the email, the problem is that the email is almost empty, without ...
11
votes
4answers
4k views

Test case failures due to VF email template

First, a little background information: I'm working on an end-to-end custom quoting solution that leverages the standard Quote object. We also utilize Sterling CPQ, which serves as the end-state for ...
3
votes
1answer
176 views

How to add ContentVersion data to an outbound email from a Trigger

So I have the following class: public static void sendmail(String documenttitle) { List<Id> contactids = new List<Id>(); List<user> con = new List<User>(); con = [...
1
vote
1answer
252 views

Dynamic reference to a property in an email template

In an email template it is possible to reference attributes by doing... "{!relatedTo.opportunity__r.CloseDate}" However, if the attribute must be in your model. If you did, "{!relatedTo....
0
votes
1answer
464 views

Office Word add-in error

A user recently started getting the following error when using Salesforce.com Office Edition Word add-in to try and open (and subsequently edit) a mail merge template: An internal server error has ...
1
vote
1answer
1k views

How to Customize the Email template on chatter posts

I want to customize the email template sent on the chatter post of the record with the @user full name to have some fields from the record. Is this possible, or how can I achieve this? Please help. ...
0
votes
1answer
133 views

Building up URL to include package name in email template

I can put a hyperlink to an Opportunity in an email template by doing: <a href="{!LEFT($Api.Partner_Server_URL_140, FIND('.com/',$Api.Partner_Server_URL_140)+3)}/{!opportunityId}> link </a&...
0
votes
1answer
479 views

Integrating an image into a email template using a component

Thanks to a good steer in this thread I have managed to get an image into an email template that I can package up and put in any org. My design: Stores the image as a document Uses a component with ...
1
vote
1answer
192 views

Set parameter in email?

Regarding a VisualForce email template, I know it is possible to setWhatId(), setSubject() and range of other things in Messaging.SingleEmailMessage. But I just want to set my own parameter. Let me ...
1
vote
2answers
93 views

Null in aggregate query

I have an image stored as a document. I put this image in an email template and reference it by doing: <img id="toplogo" src="{!LEFT($Api.Partner_Server_URL_140, FIND('.com/',$Api....
1
vote
1answer
266 views

Adding email to a package

I am trying to create an unmanaged package. When I try to add it, I get: "My Personal Email Templates" and "Unfiled Public Email Templates" cannot be added to a Package and are not shown in this ...
0
votes
1answer
2k views

Complex if statement in visual force email template

I need to check two things and based on outcome display some text. The two things are that the lastModified date of an opportunity is before one date and after another I try: <apex:outputPanel ...
0
votes
1answer
403 views

Displaying someting in email template based on a Date value

I am using a visual force template and want to add some logic which will decide whether to display something based on a date field in an Opportunity being less than a certain value. I try: <apex:...
0
votes
1answer
1k views

Need to get a numeric value from number field in email

I have a custom numeric field: NumberOfOppsWon__c. I tried to put in some conditional logical in my email template based on its value being greater than zero. <apex:outputPanel rendered="{!IF(...
1
vote
1answer
126 views

Logic to display table rows

I am display table rows in my email template... <tr> <td>{!relatedTo.opportunity__r.name}</td> <td>{!relatedTo.opportunity__r.stageName}</td> </tr> ...
3
votes
2answers
2k views

Render a Salesforce Email Template in a Visualforce Page

I need to be able to load and render an email template in a visualforce page. What are my options here? I understand that loading it is as simple as querying the EmailTemplate table. Now how do I ...
3
votes
1answer
130 views

How to create letter with related data?

I want to create a letter that can be sent via email or saved as PDF (or in the worst case exported as csv). The data for the letter comes from the following related objects: The important object is ...
2
votes
2answers
2k views

Get currency symbol in Visual Force Email Template

I need to get currency symbol in visual force email template. I want it to be the currency the user is using. I check the docs here: http://www.salesforce.com/us/developer/docs/pages/Content/...
0
votes
1answer
697 views

Adding order and a filter to data in a table in email template

In my email template, I am displaying entities in a association in table, doing the following: <table border="0"> <tr> <th>Opportunity</th><th>Digest Note</th>...
2
votes
2answers
3k views

Date format in email template

I need to format a date field in Visual Force email template so that it is of the form: December 5, 2012 I check date format guidelines in force documentation and find this: http://www.salesforce....
1
vote
2answers
190 views

Removing trailing decimal in email

I am displaying attributes that are of type Number (18,0) in an email using a Visual Force template. I am referenced the attributes in the template in the normal way. However, they are displayed as: ...
2
votes
2answers
960 views

Get VisualForce Email Template as Blob

Similar to how we can use apex to get the blob value of a VisualForce page, can we also do this on a VisualForce Email Template? We need to get the rendered template into an attachment record in ...
0
votes
1answer
3k views

Trying to put server name into a URL for email template

I am using a visual force template. I can put the origin server in the email by doing: {!LEFT($Api.Partner_Server_URL_140, FIND(".com/",$Api.Partner_Server_URL_140)+3)} and when I an email sent I'...
0
votes
1answer
593 views

Cannot recognise Organization in email template?

Using a VisualForce email template, I try to add: <p>Thank you for your interest in {!Organization.Name}</P> to my template, I get: Error: Unknown property 'core.email.template....
0
votes
2answers
1k views

Cannot resolve reference in visualforce email template

I have a custom object named: Digest. I have another custom object named: Interesting_Fact. A User can have many Digests. And a Digest can have many interesting facts. I am sending out information ...
1
vote
2answers
4k views

Is is possible to display an image or icon in a Email using a Visualforce template?

I am trying to send an email using a Visualforce template and I want that template to include an icon. Is this possible?
1
vote
1answer
2k views

Is it possible to have HTML in a visual force email template?

I have created a VisualForce template. I need to use its advanced wiring facilities so can't use other template types. I am trying to have some HTML in this template but not having much luck. I add:...
7
votes
1answer
1k views

Send bulk financial force emails

I am trying to automate the sending of sales invoices generated through financial force. I would like a one click process which fetches the outstanding invoices, bulk emails them and then marks them ...
1
vote
1answer
1k views

Are HTML based password reset templates reliably rendered?

I notice that salesforce seems to simply append the username and password at the end of the template, as far as anyone is aware are the resulting documents always well formed and reliably rendered ...
1
vote
2answers
2k views

Approval process email template limits one per action?

I'm looking for a way to have a unique template for each step on approval and rejection emails. But it appears that, only one template per action is allowed for all the steps. just one approval ...
2
votes
1answer
363 views

Changing the position of login information in password reset / New user email template

If I create a new user for my portal through my force.com site (Develop -> Sites), it triggers an email to the user with the username and password appended at the end. I have to change the position ...
3
votes
1answer
3k views

If I include 'Email Template' in Package.xml why doesn't it download?

I am trying to use the ant retrieveUnpackaged call with the SFDC Migration tool to download some email templates. I pulled the package.xml from the Force.com IDE and for whatever reason the Email ...
1
vote
1answer
1k views

Mail merge templating functionalty rebuild for custom object

I want to build more or less the same functionality as the mail merge. I was wondering if there are any standard methods or classes that can aid me. I've made a custom object named "correspondance" ...
14
votes
4answers
13k views

whatId when using custom object

I am having an html email template which uses certain merge fields from a custom object. Now I am using following apex code to send certain emails to users. Messaging.SingleEmailMessage mail = new ...
5
votes
2answers
2k views

How to generate letters in salesforce

how to generate letters in salesforce from templates, and then to print via some button (print button). I am in confusion about this. As I am confused in merge mail and generating letters. Thanks in ...
1
vote
1answer
2k views

Can you use dynamic visualforce in VF email templates?

I tried to use an tag in a visualforce email template and got the following: Error: <messaging:emailTemplate> cannot contain <apex:dynamicComponent> Is there any way to get around ...
2
votes
2answers
3k views

How to send VisualForce Email using a template from a trigger

I am trying to send an email from trigger using SingleEmailMessage. As of now, I am composing my email body using the method setHTMLBody inside the trigger itself and the email recipients are: user, ...
3
votes
1answer
789 views

Hide line items in quote pdf layout

In the Quote app I use a force.com app that adds line items to the quote. When using the standard Salesforce quote template it adds all of the quote line items to the pdf. Is it possible to use a ...
46
votes
1answer
34k views

Setting a from address in SingleEmailMessage

I want to set a from address in a salesforce SingleEmailMessage, but can't see a way to do this and there is no standard method described in the documentation. I want the email to be sent from ...
21
votes
6answers
20k views

Passing custom string into a Salesforce email template.

I've stumbled upon a problem at the final stage of a new feature I was building (as always) I need to pass in a custom string into a salesforce template, however there doesnt seem to be a way of ...
8
votes
1answer
1k views

How to get https link using URLFOR() in Email Template

So, I'm trying to build a link to a visualforce page in an email template and the following works... almost. The only problem is that I'm getting a non-ssl link (http:// instead of https://) <a ...
6
votes
2answers
2k views

Email Template related record not available

I'm building an email template, and I want to use merge fields from either a Lead or Contact but I also want to use a related record. I copy the desired merge fields into my template in the web-ui ...
7
votes
3answers
2k views

Can you perform DML operations from visualforce email templates?

Visualforce email templates allow you to include visualforce components with allowDML="true" but there doesn't appear to be any way to actually use DML. From the docs: You can't use data ...
4
votes
2answers
1k views

<apex:pageBlock /> in Visualforce Email Template

Does anyone know any workaround for using <apex:pageBlock> and it's child tags in a VF Email Template? The error that I'm getting is : Error: <messaging:emailTemplate> cannot contain <...
5
votes
1answer
1k views

How to change location of username and password in Customer Portal email

I have a very nice branded professional looking HTML email template for the New User Email Template for the email that gets sent for a new Customer Portal user. The issue is that SF just appends the ...
35
votes
6answers
18k views

Using APEX to assemble HTML Letterhead Emails

I am looking to assemble an HTML Letterhead Email Template for an email service integration project. There are two sObjects that hold this information - EmailTemplate and BrandTemplate. ...