Any suggestions on covering this use case? Our com...
# advancedpdf
n
Any suggestions on covering this use case? Our company started dabbling in multi-tenant scenario during the pandemic. Long story short, this side of the business took off for a while but data wasnt managed well. Now they want to send the same invoice to all contacts on the account. so if there are 3 contacts, they want to print the same invoice 3 times but with different contact mailing details in the mailing window.
l
Have you figured this out? I have the same problem. Thanks!
n
Yep, but needed to write a script. The script calls a Analytics Workbook where we have all the contacts listed. and then we use this to include it in the PDF:
Copy code
<br /><br />
  <#list contacts![]>
    <#items as contacts> 
        <table class="itemtable" style="width: 100%; margin-top: 10px;">
        <thead>
            <tr>
            <th colspan="3" style="width: 61px;">First Name</th>
            <th align="center" colspan="12" style="width: 101px;">Last Name</th>
            <th align="center" style="width: 123px;">Phone</th>
            <th align="center" style="width: 183px;">Email</th>
            <th align="right" colspan="4" style="width: 140px;">Last Login Date/Time</th>
            <!--<th align="right" colspan="5" style="width: 108px;">Narrative</th>-->
            </tr>
        </thead>
          <tr>
            <td colspan="3" style="width: 61px;">${contacts[0]}</td>
            <td align="center" colspan="12" style="width: 101px;">${contacts[1]}</td>
            <td align="center" style="width: 123px;">${contacts[3]}</td>
            <td align="center" salign="center" tyle="width: 183px;">${contacts[2]}</td>
            <td align="right" colspan="4" style="width: 140px;">${contacts[5]}</td>
            <!--<td align="right" colspan="5" style="width: 108px;">${contacts[5]}</td>-->
            </tr>
          </table>
       <table>
         <tr>
          	<td style="width: 100%"><p>Last Contact Comment: ${contacts[6]}</p></td>
          </tr>
      </table>
      </#items>
	</#list>
I'd give you the script but it has a lot of other stuff, not related in it.
Some of which is proprietary but hope this helps 🙂
l
This is already very helpful. Thank you for sharing!
👍 1