You need to sign in to do that
Don't have an account?
Custom Objects in VisualForce Email Templates
Hi,
The online help seems to suggest that only standard objects are support for visualforce EMAIL templates.
<messaging:emailTemplate recipientType="Contact" relatedToType="Vacancy__c" subject="Test" replyTo="support@acme.com"> <messaging:htmlEmailBody > <html> <body> <p>Dear {!Vacancy__c.Name},</p> </body> </html> </messaging:htmlEmailBody> </messaging:emailTemplate>
Going to switch to full HTML if this is not supported.
Thanks
It is supported - we've done this in a few different projects. It has a slightly different syntax though:
All Answers
It is supported - we've done this in a few different projects. It has a slightly different syntax though:
Strange I'm sure I tried that and it didn't work.
it's working - thanks
Hello,
What about using custom objects in an apex:repeat call, is that allowed?
<apex:repeat var="cx" value="{!relatedTo.CustomObject__c}">
I get the following error: Invalid field CustomObject__c for SObject Cita__c
Hi Bob,
Something you cannot do unless you know a trick is to use a custom email field in a visualforce email template. In work flows you can specify a customemail field to be used in an email template. HTML email templates can utilize these work flows.
You can specify for example:
try
<apex:repeat var="cx" value="{!relatedTo.CustomObject__r}">
It works.
Thanks
Aditya