7
votes
Accepted
How to show the todays date in VF Email template in salesforce
In visualforce you need to use {!TODAY()}. Also you can use Year, Month and Day to format it any way you want it. For example:
{!DAY(TODAY())}-{!MONTH(TODAY())}-{!YEAR(TODAY())}
{!MONTH(TODAY())}/{!...
7
votes
Error Error: Unsupported type: common.api.soap.wsdl.Address used in expression: relatedTo.Account.PersonMailingAddress
Address is a Compound field which can only be accessible by SOAP or REST API.
You cannot use Address compound field in VFP. You need to use individual fields of the Address.
{!relatedTo.Account....
5
votes
Accepted
How to create the fixed width table in VF Email Template or using html?
You need to create a CSS and add styling to handle this.
<table class="fixed">
<col width="20px" />
<col width="30px" />
<col width="40px" />
<tr>
...
4
votes
Accepted
Error Error: Unsupported type: common.api.soap.wsdl.Address used in expression: relatedTo.Account.PersonMailingAddress
A more correct merge would be something more like:
{!relatedTo.Account.PersonMailingStreet}<br />
{!relatedTo.Account.PersonMailingCity}, {!relatedTo.Account.PersonMailingState} {!relatedTo....
4
votes
Accepted
Get community link in email template
I had a similar use case with a partner community. After extensive search, I couldn't find a proper solution, so we used the following workaround.
We used a Custom Label to store the Community URL ...
3
votes
Accepted
Visualforce email template in Lightning
Visualforce email template is available in Lightning, but you can't create a new VF template directly from lightning. for that, you have to use classic email templates setup.
You can use same Classic ...
3
votes
Accepted
How to Avoid Exponential Value(2.0E+7) in VF Email Template?
I don't know where you are working but they are making interesting deals :D
If you want your amount to be formatted as currency you should use:
Total Value:<apex:outputText value="{0, Number, ...
2
votes
VF Email Template With VF Component Not Working For Community Forgot password
I hope your issue has got resolved. If not yet, please refer the points mentioned below.
You will start receiving Forgot Password emails by setting recipient as Contact in Visualforce Email Template....
2
votes
Help Required on visualforce email template
You can use a before update Flow or an apex trigger to write the old value to a custom field. Then you can reference the field that has old value in your email template.
Using Flow
When a record is ...
1
vote
Accepted
Sending VF Email in Apex
<c:followUpComponent optyOwnerId="{!relatedTo.Id}" />
Should probably be:
<c:followUpComponent optyOwnerId="{!recipient.Id}" />
I'm not entirely sure why it should be ...
1
vote
Accepted
<Apex:OutputLink> Tag not generating link in Visualforce email template
<apex:outputLink> value= has to render to a valid https:// address to the SFDC record defined by:
{!relatedTo.S_TicketingTool__r.Id}
(which by the way, is the same as {!relatedTo....
1
vote
Accepted
Community Forgot Password Email Template picking up incorrect merge fields values - Spring 22 Preview Effect
26th JAN 2022
Based on Case with Salesforce Support. It has been confirmed as a bug. They mentioned the Product team is working on a similar known issue, and if the issue still doesn't resolve they ...
1
vote
Accepted
Visualforce Email Template - broken images for all Email Clients? Workaround?
Neither of your URLs are correct. Your code should include the server (emails are naturally not on the same server as Salesforce), and you need to verify the parameters you're putting in to the URL.
...
1
vote
VF Email Template - Welcome New Member - {!$User.FirstName} displays created by user, not recipient
Be careful of the merge fields you use, depending on the email template.
For VF email templates:
{!$User.x} references the user that created the community member.
{!Recipient.x} references the ...
1
vote
Accepted
Get last created related object data in Visualforce Email Template
Without a way to specify a controller or extension in the template itself, anything you do in the component will be constrained to that component. You also can't reliably use <apex:variable> ...
1
vote
"Unsupported attribute ..." error when deploying VF Email template with ANT
Salesforce released workaround is to split the deployment into two:
First deployment contains Apex classes and Visualforce pages
Second deployment contains the Visualforce components
As mentioned ...
1
vote
Accepted
Format String Visualforce Component in a Custom Visualforce Template
Here is your issue:
The field passed to the VF component is of type Date
trialRequestShipDate="{!relatedTo.Requested_Ship_Date__c}
The component defines it as type String
<apex:attribute name ...
1
vote
Accepted
Unable to retrieve {!recipient.Fieldname} values in custom visual force email template
Use a custom component to deal with the polymorphism of Event.WhoId
<messaging:emailTemplate subject="foo" relatedToType="Event">
<messaging:htmlEmailBody >
<html>
<body>...
1
vote
Accepted
How to print data in VF email template without line break?
Wrap the 2 lines within the same component and put a after the period
<h5>In my younger and more vulnerable years my father gave me some advice that I've been turning over in my mind ever ...
1
vote
Error Error: Unsupported type: common.api.soap.wsdl.Address used in expression: relatedTo.Account.PersonMailingAddress
Mailing Address is a combination of 5 fields (MailingCity, MailingStreet, MailingState, MailingPostalcode & MailingCountry). You cannot add mailing address directly to the Visualforce template. ...
1
vote
Accepted
Error Error: Invalid child of messaging:emailTemplate. Only messaging components are allowed as children of messaging:emailTemplate
The issue is occurring because you are commenting your code like apex class with "/**/" sign.
As it Visualforce email template it should be commented like visual force page like below : -
<...
1
vote
Accepted
visual force component in salesforce
Generally, you use parameters to customize a component. That might look like this:
<apex:component controller="myController1" access="global">
<apex:attribute name="showUrl" assignTo="{!...
1
vote
Accepted
Using VisualForce Email templates
Here's the broad strokes of what I'd do:
Create a custom Apex controller to use with your visualforce template. The main purpose of this controller would be to use a SOQL query to return a list of ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
vf-email-template × 48email-template × 20
visualforce × 19
apex × 10
visualforce-component × 7
visualforce-template × 5
dynamic-vf-component × 4
community × 3
email × 3
dynamic-visualforce × 3
controller × 2
custom-controller × 2
lightning × 1
lightning-web-components × 1
salesforcedx × 1
visual-workflow × 1
deployment × 1
custom-object × 1
workflow × 1
formula-field × 1
scheduled-apex × 1
attachment × 1
date × 1
user × 1
tasks × 1