function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
How to access the class and methods in visualforce Email Template,Is it possible
John,
You can create a Visualforce component and can use in your visualforce email template.
For more info and sample,please go through below link :
http://www.salesforce.com/us/developer/docs/pages/Content/pages_email_templates_with_apex.htm
Component:
<apex:component controller="myAccountsDisplay" access="global"><apex:outputtext value="Welcome to my First Component" style="font-size:20px;color:blue;"></apex:outputtext> <br/><br/><apex:datatable value="{!lstAcc}" var="a"><apex:column headerValue="Name" value="{!a.name}"/></apex:datatable></apex:component>
class:
public with sharing class myAccountsDisplay {
public List<Account> lstAcc{get;set;}public myAccountsDisplay(){lstAcc = [select id,name from Account];}}
VF Template:
<messaging:emailTemplate subject="test" recipientType="User" ><messaging:HTMLEmailBody ><c:testingComponent /></messaging:HTMLEmailBody></messaging:emailTemplate>
John,
You can create a Visualforce component and can use in your visualforce email template.
For more info and sample,please go through below link :
http://www.salesforce.com/us/developer/docs/pages/Content/pages_email_templates_with_apex.htm
Component:
<apex:component controller="myAccountsDisplay" access="global">
<apex:outputtext value="Welcome to my First Component" style="font-size:20px;color:blue;"></apex:outputtext> <br/><br/>
<apex:datatable value="{!lstAcc}" var="a">
<apex:column headerValue="Name" value="{!a.name}"/>
</apex:datatable>
</apex:component>
class:
public with sharing class myAccountsDisplay {
public List<Account> lstAcc{get;set;}
public myAccountsDisplay(){
lstAcc = [select id,name from Account];
}
}
VF Template:
<messaging:emailTemplate subject="test" recipientType="User" >
<messaging:HTMLEmailBody >
<c:testingComponent />
</messaging:HTMLEmailBody>
</messaging:emailTemplate>