How can i create table for related records in email template

Posted by Sudhakar on 16-Jul-2014 18:24

Hi all,



The above shown SS is my email template,In 1st table we have Referral source and its related List of Campaigns(12 the example i showed in SS) and in 2nd table i need to display the each campaign in One row(Total 12 rows for 2nd table) i.e i need to decompose the 1st table in detail.

Can any one help me how can i achieve the above.  

All Replies

Posted by Orchid Corpin on 16-Jul-2014 19:01

Hi Sudhakar,

To achieve this,  first create a "Template" field in the parent object where you store the 2nd table, something like the code below.

//Template Field Code - loop all related records

<table border="1">

<tbody>

{!#LOOP_BEGIN.R104894322#104738139}

<tr>

 <td>{!R104894322.name#text}</td>

</tr>

{!#LOOP_END.R104894322}

</tbody>

</table>

In the email template you can find the "HTML" menu - open that to insert HTML codes for creating your parent table,

the 2nd table with the list of the related records you can just insert the token:

<!--Email template body in the HTML Source Editor-->

<table border="1">

<tbody>

<tr>

<td>{!name#text}</td>

</tr>

</tbody>

</table>

<p>{!tbl_body}</p>   <!--this is the 2nd table token-->

Hope this will help.

Regards,

Orchid

Posted by Sudhakar on 17-Jul-2014 14:18

Thanks [mention:e6fb884e9c7b45a2a638966c06dc0941:e9ed411860ed4f2ba0265705b8793d05]

Posted by Orchid Corpin on 17-Jul-2014 15:22

Hi Sudhakar,

You are welcome!
Does this works already? or is there anything else you need so we can help you.

Regards,
Orchid

Posted by Sudhakar on 17-Jul-2014 18:43

ya it worked for me,i have customized your solution.thanks for idea.

Posted by Orchid Corpin on 18-Jul-2014 09:32

That's great!

Regards,
Orchid

This thread is closed