Questions tagged [visualforce-template]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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 ...
Learner's user avatar
  • 450
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 ...
andy's user avatar
  • 91
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 ...
user7101's user avatar
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: <...
andy's user avatar
  • 91
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 ...
Nelson's user avatar
  • 41
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 ...
Natasha's user avatar
  • 127
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 :)...
Jarvis's user avatar
  • 2,100
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 ...
Artur Kępczyński's user avatar
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 ...
Bartley's user avatar
  • 5,237
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 ...
Sathya's user avatar
  • 1,203
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 ...
SalesforceAspiration's user avatar
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.
goodForce's user avatar
  • 1,235
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 ...
Bugrahan 's user avatar
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 ...
Nick's user avatar
  • 6,934
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 ...
gopal1007's user avatar
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 /> </...
Konnor McDowell's user avatar
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 ...
proteuscanvas's user avatar
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 ...
Lavanya Sanathkumar's user avatar
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 ...
goodForce's user avatar
  • 1,235
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 ...
Brian23Gt's user avatar
  • 109
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 ...
kbentsen's user avatar
  • 565
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 ...
Irene's user avatar
  • 1,763
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 ...
Abhik Dey's user avatar
  • 357
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 ...
jpmonette's user avatar
  • 4,400
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 ...
user4955's user avatar
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 ...
GPP's user avatar
  • 553
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="...
DaphneC's user avatar
  • 13
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:...
Michelle's user avatar
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"&...
user42273's user avatar
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'...
iDog's user avatar
  • 484
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 ...
RajeshShah's user avatar
  • 1,754
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 ...
Bobbygllh's user avatar
  • 721
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 ...
Natasha's user avatar
  • 127
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 ...
Antonio L's user avatar
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 ...
The Gilbert Arenas Dagger's user avatar
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&...
jaw999's user avatar
  • 1,308
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: ...
Scott's user avatar
  • 13
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> ...
jaw999's user avatar
  • 1,308
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 ...
Thomas Riddler's user avatar
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 ...
AwesomeAdmin8's user avatar
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 ...
user2957592's user avatar
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="...
mvk1991's user avatar
  • 535
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&...
Pratap Jadhavar's user avatar
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:...
Samuel's user avatar
  • 83
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 ...
user4567570's user avatar
  • 1,616
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 ...
Brav's user avatar
  • 708
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 ...
iDog's user avatar
  • 484
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 ...
dphil's user avatar
  • 6,145
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 ...
jonathanwiesel's user avatar
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 ...
Pratik's user avatar
  • 45