Hello Robin, you can use a visualforce email template , see below a working example parent object:Quote relates list with a custom Object ContainerLine Items I hope will help you! Dimtiri
This will be my first attempt at Visualforce, I'll use your template as an example. The custom object I'm using this for is called "Engagements" and the related list custom object is called "FMI Services". I'm trying to get FMI Services fields to show up on an email that I'm sending to my finance department to obtain a code for invoicing. Currently only the fields for the Engagement custom object is populating on a email template and I'm wanting to add the fields from the FMI Services to the email template.
Any advice on what to change on your template? I'm planning on doing the Trailhead module for Visualforce Basics.
Robin,
Ideally I would use an appexchange to generate the template for you
Try Docomotion is really good and no code, we use it for all the official email correspondence
Definitely change the quote to Engagements and Container Line Item to FMI Services
Cheers
dimitris
you can use a visualforce email template , see below a working example
parent object:Quote
relates list with a custom Object ContainerLine Items
I hope will help you!
Dimtiri
<messaging:emailTemplate subject="Arrival Notice Consirnation Quote:{!relatedTo.QuoteNumber} / {!relatedTo.Booking_Ref__c}" recipientType="User" relatedToType="Quote">
<messaging:htmlEmailBody >
<img src="https://c.eu0.content.force.com/servlet/servlet.ImageServer?id=01520000003iuwa&oid=00D20000000CpOP&lastMod=1463391182000"/>
<p> </p>
<body style="font-family: 'Tahoma'">
<table border="1" cellpadding="1" cellspacing="1" style="width:800px;">
<tbody>
<tr>
<td style="text-align: center;"><span style="color:#0000FF;"><span style="font-size:36px;">ΒΕΒΑΙΩΣΗ ΑΝΑΜΕΝΩΜΕΝΗΣ ΑΦΙΞΕΩΣ ΕΜΠΟΡΕΥΜΑΤΩΝ</span></span></td>
</tr>
</tbody>
</table>
<p> </p>
<p><span style="font-size:20px;"><span style="font-family:tahoma,geneva,sans-serif;">{!relatedTo.Account_Pros__c}</span></span></p>
<p><span style="font-size:20px;"><span style="font-family:tahoma,geneva,sans-serif;">{!relatedTo.Arrival_Notice_Blue_Desr__c}</span></span></p>
<p><span style="font-size:20px;"><span style="font-family:tahoma,geneva,sans-serif;">{!relatedTo.Collect_Freight_Description__c}</span></span></p>
<p><span style="font-size:20px;"><span style="font-family:tahoma,geneva,sans-serif;">Τα στοιχεια του φορτιου είναι:</span></span></p>
<br />
<table cellpadding="5" style="border-collapse: collapse" width="100%">
<tr>
<td style="background-color: #0099CC; color: #FFFFFF">
<b>Container No</b>
</td>
<td style="background-color: #0099CC; color: #FFFFFF">
<b>Container Type</b>
</td>
<td style="background-color: #0099CC; color: #FFFFFF">
<b>House BL</b>
</td>
<td style="background-color: #0099CC; color: #FFFFFF">
<b>Content</b>
</td>
<td style="background-color: #0099CC; color: #FFFFFF">
<b>Quantity</b>
</td>
<td style="background-color: #0099CC; color: #FFFFFF">
<b>Weight(Kgs)</b>
</td>
<td style="background-color: #0099CC; color: #FFFFFF">
<b>Volume(cbm)</b>
</td>
<td style="background-color: #0099CC; color: #FFFFFF">
<b>Shipper Name</b>
</td>
</tr>
<apex:repeat value="{!relatedTo.Container_Line_Items__r}" var="lineItem">
<tr>
<td>
{!lineItem.Container_No__c}
</td>
<td>
{!lineItem.Container_Type__c}
</td>
<td>
{!lineItem.HBL_HBL__c}
</td>
<td>
{!lineItem.Content__c}
</td>
<td>
{!lineItem.No_of_Packages__c}
</td>
<td>
{!lineItem.Weight__c}
</td>
<td>
{!lineItem.Volume__c}
</td>
<td>
{!lineItem.Shipper_Name__c}
</td>
</tr>
</apex:repeat>
</table>
</body>
<table border="0" cellpadding="1" cellspacing="1" style="width:500px;">
<p> </p>
<p><span style="font-family:tahoma,geneva,sans-serif;"><span style="font-size:20px;">Με φιλικούς χαιρετισμούς</span></span></p>
<p><span style="font-family:tahoma,geneva,sans-serif;"><span style="font-size:20px;">{!$User.FirstName} {!$User.LastName}</span></span></p>
<p><span style="font-family:tahoma,geneva,sans-serif;"><span style="font-size:20px;">{!$User.Title}</span></span></p>
<p><span style="font-family:tahoma,geneva,sans-serif;"><span style="font-size:20px;">{!$User.Street} </span></span></p>
<p><span style="font-family:tahoma,geneva,sans-serif;"><span style="font-size:20px;">{!$User.PostalCode} {!$User.City}</span></span></p>
<p><span style="font-family:tahoma,geneva,sans-serif;"><span style="font-size:20px;">{!$User.Country} </span></span></p>
<p><span style="font-family:tahoma,geneva,sans-serif;"><span style="font-size:20px;">Tel: {!$User.Phone} </span></span></p>
<p><span style="font-size:20px;">Mobile: {!$User.MobilePhone} </span></p>
</table>
</messaging:htmlEmailBody>
</messaging:emailTemplate>
This will be my first attempt at Visualforce, I'll use your template as an example. The custom object I'm using this for is called "Engagements" and the related list custom object is called "FMI Services". I'm trying to get FMI Services fields to show up on an email that I'm sending to my finance department to obtain a code for invoicing. Currently only the fields for the Engagement custom object is populating on a email template and I'm wanting to add the fields from the FMI Services to the email template.
Any advice on what to change on your template? I'm planning on doing the Trailhead module for Visualforce Basics.
Thanks,
Robin