Netsuite - 如何从工作流将保存的搜索结果导入可编写脚本的电子邮件模板



所以我正在尝试创建一封电子邮件,该电子邮件将发送给客户,其中包含逾期未付余额和工作流程保存的搜索中的详细信息。我想使用可编写脚本的电子邮件模板来创建我们要发送给客户的信息的布局。我确实考虑过使用该语句,但由于我们希望我们发送的数据位于电子邮件的中间,因此很难看到语句的唯一设置位于电子邮件文本上方或下方。

我的问题是在可脚本化模板中,我有以下陈述

<#if results?has_content>
<table style="width:100%; margin-top:10px;"><!-- Start items -->
<thead>
<tr>
<th colspan="6">Transaction Number</th>
<th colspan="3">Invoice Date</th>
<th colspan="3">Due Date</th>
<th colspan="9">REFERENCE</th>
<th align="right" colspan="4">Invoice Amount</th>
<th align="right" colspan="4">Remaining Amount</th>
<th align="right" colspan="4">Payment / Credit Memo</th>
</tr>
</thead>
<#list results as result>
<tbody>
<tr>
<td colspan="6">${result.tranid}</td>
<td colspan="3">${result.trandate}</td>
<td colspan="3">${result.duedate}</td>
<td colspan="9">${result.otherrefnum}</td>
<td align="right" colspan="4"><#if results.type == "CustInvc">${result.amount}</#if></td>
<td align="right" colspan="4">${result.amountremaining}</td>
<td align="right" colspan="4"><#if results.type == "CustCred">${result.amount}</#if></td>
</tr>
</tbody>
</#list></table>
</#if>

但是,当计划的工作流触发并发送电子邮件时,我没有得到表格,因为结果似乎没有任何内容。这能这样完成吗?

之所以没有编写"我宁愿这样"的脚本,是因为当我运行测试脚本时,它们超时了,因为收集的数据量很大。

任何帮助将不胜感激。

您只能在可编写脚本的电子邮件模板中获取记录对象。

最新更新