Displaying data in an email from one to many relation table

We know that boradLogRcp has a one to many relationship (1 to N) with recipient schema. So for every recipient I want to show all the emails sent to him/her
  • Create a simple workflow to select the recipients of your choice
  • Add a delivery/recurring delivery and pull the OTB default email template and configure it with below code
<TABLE> <TBODY> <TR> <TD>Campaign name</TD> <TD>Delivery Name</TD> <TD>Event Date</TD> </TR> <% for(var i = 0 ; i<recipient.broadLog.length; i++) { document.write("<tr>"); document.write("<td>" + recipient.broadLog[i].delivery.operation.label + "</td>"); document.write("<td>" + recipient.broadLog[i].delivery.label + "</td>"); document.write("<td>" + recipient.broadLog[i].eventDate + "</td>"); document.write("</tr>"); } %> </TR> </TBODY> </TABLE>
Here is how the email looks like

Comments

Popular posts from this blog

Avoid Proxy for HttpClientRequest - IOB-090007 Network error (send(), errno=10054: an existing connection was forcibly closed by the remote host

Adobe Campaign: Call Java Script from Input Form

Call stored procedure from Adobe Campaign Classic