Questions tagged [visualforce-template]
The visualforce-template tag has no usage guidance.
112
questions
7
votes
2
answers
8k
views
Salesforce Visualforce Email Template {!Recipient.Name} does not have the correct value
I have an object called 'Request'. This object has three lookup fields 'Reviewer 1', 'Reviewer 2', 'Reviewer 3' (User object); besides other non-relevant fields.
I have created a Workflow rule, which ...
5
votes
3
answers
657
views
Some recipients see lines of code in e-mail template
I coded an e-mail template in Visualforce, however, some recipients see lines of code in the the e-mail that's sent to them. Please see example below:
Hello ,
Products to be include in the quotation ...
5
votes
1
answer
4k
views
Add Attachment from Notes and Attachment related list in a VF Email template
I have a requirement and I appreciate your help on this.
We have a custom object, where users create records and upload spreadsheets in "Notes & Attachment" related list.
Our requirement is, we ...
4
votes
2
answers
3k
views
PDF generation failed. Check the page markup is valid
I am trying to create a table using "apex:OutputPanel" but I get the error message "PDF generation failed. Check the page markup is valid." Any ideas how I can fix it? Here is my code below:
<...
4
votes
0
answers
2k
views
<script> tag generated by salesforce after </html> tag
I am building a website using templates and apex pages. In my apex page I have the option applybodytag and applyhtmltag set to false and I use the <head> and <body> tags in my template ...
3
votes
1
answer
5k
views
Dynamic Subject in a Visualforce email template
This is my Visual force email template :
Controller
public class casetemplate{
public id accountid{get;set;}
public list<case> getcases(){
List<case> caselist= [SELECT ...
3
votes
1
answer
973
views
How to avoid hardcoding of ouput link value in VF email template?
I am designing a Visualforce email template for an approval process and trying to provide a link to Salesforce for the approver. I want to avoid hardcoding of the URL to avoid a post deployment step :)...
3
votes
3
answers
2k
views
Existing file as attachment in visualforce component
This time I would like to ask if anyone was able to add existing document/attachment(PDF) to visualforce template as file attachment?
Of course I mean add as part of logic in template(component). This ...
3
votes
1
answer
965
views
problem putting an rtf field into visualforce html email template
I want to create an email from a template and insert the contents of an rtf field from a record into the email. To this end, I created a visualforce email template (see attached code) My problem is ...
3
votes
1
answer
1k
views
How to Put Image into PDF
I am creating the PDF by using Templates, i want to paste the image In PDF file i am using another server URL, it's working fine for me For Visualforce templates, it's not working for the PDF which ...
3
votes
1
answer
1k
views
How can I attach a pdf in salesforce email,edit the email body and the changes will reflect in atached pdf?
I want to attach a pdf in a salesforce email by selecting an email template.I have created one visualforce template by which I am able to attach the pdf to the mail.But my requirement is user can edit ...
3
votes
1
answer
4k
views
Can we get approval process fields in Visualforce email template?
Can we get approval process fields in Notification (Visualforce)template?
if yes, how to get the current approver?
I need to change the email verbiage based on the approver.
3
votes
0
answers
176
views
Visualforce Email Template Page Break
Is there any way to force email template to continue as a second page ? I tried "page-break-before:always" "page-break-after:always" but it does not work for me. What can i do to add page break to ...
2
votes
1
answer
5k
views
Multi-lingual Visualforce email templates
I have a requirement where on workflow rules I want to send out an email in the users preferred language, Is there a way to create multi-lingual visualforce email templates?
here is the sample ...
2
votes
2
answers
5k
views
Conditional rendering using IF in Visualforce Template
I have a VF template where I need to vary the closing part of the mail(after 'Best Regards') based on a particular Picklist field on the case object.
Eg if Custom_field__c ='ML' then the closing part ...
2
votes
1
answer
560
views
Visualforce component applyBodyTag work-around
I have a visualforce page and visualforce component. The visualforce page simply calls the visualforce component:
<apex:page renderAs="pdf" applyBodyTag="false">
<c:Component />
</...
2
votes
1
answer
6k
views
How do I use a field to populate the mail.setToAddresses in a sendEmail class
I have set up a class that sends an email and I am using a VF Email Template that uses the Oppertunity fields. I have set up a custom field called Proposals_Senders_Email__c that is a text field.
I ...
2
votes
1
answer
223
views
How to remove random characters appearing in the VF email?
When sending the VF email template we are getting random characters appearing in the subject of the e-mail. Also i am getting this random character in the body of the email for the empty email which ...
2
votes
2
answers
3k
views
Sent CC and BCC in approval process notification email
I have a scenario that user will approve records through email and added to approver some other user will also notified in the same email.
As content also varies I Planned to user visualforce ...
2
votes
1
answer
409
views
Dark Mode and Visualforce templates
I have been looking for a solution to be able to show the email body with white text and black background when the dark mode is enabled. But so far I haven't seen any solution that is actually working ...
2
votes
1
answer
1k
views
Pass List of sObject to VF email template / Best way to get just inserted records
Looking for assistance to my approach here. What I'm trying to do is set up a notification such that when a user clicks a button to insert records, it will include data from the newly inserted records ...
2
votes
0
answers
58
views
Can I use a SelectList in a VisualForce email template?
I have a VisualForce email template which is used to send a list of products to customers. The products are listed in a table in the email and I would like the end column to be a picklist with options ...
2
votes
0
answers
63
views
HTML Email Teamplate Issues SF
In the HTML email template I want to distinguish between internal and external user while sending any email. I tried using If loop and it worked for me but while I try to access certain merge fields ...
2
votes
0
answers
380
views
User Field Level Security behavior with a Workflow Email Alert using a custom Visualforce page
I'm currently having an issue with a custom Visualforce email template not displaying a field value when sent. This email is sent using from a Workflow rule assigned to an Email alert. Considering ...
1
vote
3
answers
3k
views
Email Template Creation
I want to create an email template for custom object. It should display certain fields of the custom object depending on some conditions like the value of the city or country fields.
How can I do ...
1
vote
2
answers
933
views
VisualForce apex:repeat Related Objects not rendering in VF Email
Thanks to Boris Bachovski , I was able to successfully get my VisualForce email to compile.
However, when I fired off a test Email Alert, (this action was linked with the VF Template) the ...
1
vote
1
answer
2k
views
How do I send parameters through to a component on a Visualforce email template?
I'm trying to pass an object id to my component on my visualforce template but when it sends the mail it seems that it does not get the object id.
My Template:
<messaging:emailTemplate subject="...
1
vote
2
answers
674
views
How to have a field display without a decimal
I have three fields in the subject line, the last 3, that are displaying the numbers with a decimal. The fields are rollup summaries. How can I get it so it doesn't show the decimal?
<messaging:...
1
vote
1
answer
2k
views
Displaying user's profile picture dynamically in email template
I have a requirement to display user's profile picture dynamically in the email template.
Email template:
<messaging:emailTemplate subject="Test" recipientType="Contact" relatedToType="Account"&...
1
vote
1
answer
1k
views
Add User Profile Picture to VisualForce Email Template
I have a running VisualForce Email Template for 'Case', and wish to include the Case.Owner profile picture.
I am reading (here) that one can use either FullPhotoUrl or SmallPhotoUrl, but this doesn'...
1
vote
1
answer
48
views
Add > in Visualforce Template Email Subject
I need to add > to the subject of Visualforce email template. Like:
Wayne Enterprise > Bruce Wayne
Directly adding > in the subject doesn't work. I have tried adding HTML code as shown below but ...
1
vote
1
answer
1k
views
Custom Lightning Record Page Template not showing up in Template Switching Wizard
Built a custom lightning record based on the code here (the "Making a Record page with collapsing regions" one). It shows up under Custom when i go to build a new lightning record page but when i go ...
1
vote
1
answer
334
views
VF Email Template
I need help in making the below scenario work .
Below is the detailed explanation
On the child custom object we have custom button send email which sends email to the selected child records . Through ...
1
vote
1
answer
850
views
Japanese character displays in Visualforce template but in PDF it shows question marks (???) [closed]
In my company we use Servicemax managed package. In one of the transactions, we have a visualforce template that generates a report.
When I check it in our visualforce page I see it like this:
But ...
1
vote
2
answers
70
views
Generating custom PDFs for service orders
This is a somewhat broad question so I'm looking for expert guidance more so than concrete steps to take.
I'm looking to create a service order PDF in Salesforce. The main content looks a lot like ...
1
vote
1
answer
261
views
Visualforce Email Template Related Info
I have a template for a Custom Object Business_Trip__c with Child relationship to Event via Custom Lookup.
I want to show related meetings.
Template below:
<p><b>Planned Meetings:</b&...
1
vote
1
answer
361
views
VisualForce Email Template outputLink randomly injects javascript
I have an email template that uses apex:outputLink for incorporating links. The reason I cannot just use html tags is because they are conditional by using render.
I normally see the correct URL:
...
1
vote
1
answer
707
views
Relating ProcessInstance in visualforce emails
Demo for a visualforce email via Salesforce shows how you can relate fields - look at how Contact's email is included:
<apex:repeat var="cx" value="{!relatedTo.Cases}">
<tr>
...
1
vote
1
answer
89
views
opening links with apex:detail using apex:composition
I have a visualforce page using an apex:composition with a template specified.
within this page, I am displaying an apex:detail of an object's detail page. However, the links on the detail page ...
1
vote
2
answers
72
views
How to see the fields which are used in a Visualforce email template
Have a visualforce email template for details on Opportunity closed won - I want to check which fields are being pulled through into the template from the Opportunity record.
Where do I go to find ...
1
vote
0
answers
993
views
Using custom fonts in visualforce email templates
I am creating visualforce email template and need to use custom fonts (mostly Neutraface Display, SalesforceSans, TrailheadBold2). Most of the search results i get are about using them in visualforce ...
1
vote
0
answers
828
views
Visualforce Email template - merge fields not working
I need to populate the merge field for the related accounts creator/owner.
I have these details:-
<messaging:emailTemplate subject="Employers initiating Enrollment for Employees" recipientType="...
1
vote
1
answer
298
views
How to get the attachments in apex which we have set in visualforce email template using <messaging:attachment>
below is the code snippet of the visualoforce email template.
<messaging:emailTemplate>
<messaging:attachment renderAs="PDF" filename="yourCases.pdf">
<html>
<body&...
1
vote
0
answers
80
views
Add A Visual Image Into a VF E-Mail template from the "Notes & Attachments" related list of a managed package object
This is the code I have written thus far:
<messaging:emailTemplate subject="Your Offering Listing"
recipientType="Contact"
relatedToType="vlocity_ps__InventoryItem__c">
<messaging:...
1
vote
1
answer
1k
views
Unable to load VF Component in the VF Email Template
I am facing issues while developing Visualforce email template. I am unable to add VF components in the Visualforce email template. Looks everthing good to me, but not sure why VF Component not ...
1
vote
0
answers
53
views
Chatter to Apex: Getting Attachment
I am using rest api (ConnectApi namespace output classes) to get the chatter feed details of a particular group in my org and using Javascript remoting to display the elements in a custom vf page. So ...
1
vote
1
answer
928
views
VisualForce Email Template - include Case Email Messages through controller
I am trying to create a VisualForce Email Template, related to the Case Object.
In the template, I wish to include the email correspondence we had with the customer as a thread.
Below are the Apex ...
1
vote
0
answers
50
views
Visualforce email template with User chosen criteria [closed]
Is there any workaround to pass some User chosen data into VF Email templates for the controller to process? I want the User to be able to choose a date range to send information about a collection ...
1
vote
0
answers
118
views
Visualforce case assignment template visibility issue
I've created a Visualforce email template to use as notification when a case is assigned to a user (By setting the template in Support Settings > Case Assigned Template). Let's say it looks something ...
1
vote
0
answers
81
views
Issue with displaying related object fields in email alert via trigger using Email Template
I am sending an email alert from my trigger using the below template. The problem is that {!relatedTo.Id} cant be seen in the email alert. How could this be achieved other than substituting the email ...