You need to sign in to do that
Don't have an account?
Support 3743
Displaying account-related partners in email template
I have a list of accounts and I want to display all the partners for one particular account in an email sent to that account. I'm using a Visual Force email template but I don't know how to fetch all the account-related partners in the email template. Can someone please help? Thank you!
<messaging:emailTemplate subject="Test Mail" recipientType="Contact" relatedToType="Account">
<messaging:htmlEmailBody>
<table>
<tr>
<th>Partner Name</th>
<th>Email</th>
<th>Phone</th>
<th>City</th>
</tr>
<apex:repeat value="{!relatedto.Partner__c}" var="temp">
<tr>
<td>{!temp.Name}</td>
<td>{!temp.Email}</td>
<td>{!temp.Phone}</td>
<td>{!temp.City}</td>
</tr>
</apex:repeat>
</table>
</messaging:htmlEmailBody>
</messaging:emailTemplate>
Try this one and Change the Fields as Per Your Requirement.Let me Know the Output Once you Implemented this.
Kindly Mark this as a Best Answer if it Helps You!
Thanks,
Dinesh Kumar Gopalakrishnan
you need to use soql in apex code like:
passs your account id in soql and send list to visualforce page email template.
if you need any assistance please let me know
Kindly mark my solution as the best answer if it helps you.
Regards
Mukesh