更改作为 PDF 附件发送的交易的电子邮件正文

Changing the email body for transactions sent as a PDF attachment

当销售订单通过电子邮件发送给电子邮件首选项设置为 PDF 的客户时,电子邮件正文如下:

Please open the attached file to view your Sales Order.

To view the attachment, you first need the free Adobe Acrobat Reader. If you don't have it yet, visit Adobe's Web site http://www.adobe.com/products/acrobat/readstep.html to download it.[/CODE]

我想在此消息中补充一点。我认为这将需要我编写一个脚本,将交易呈现为 PDF 模板,并发送包含我选择的任何消息的电子邮件。它还需要阻止 NetSuite 发送默认电子邮件。

以下是否可行:

在销售订单记录的 beforeSubmit 函数中,如果客户的 Email Preference=PDF,请取消选中 'Email To' 字段。将新的自定义复选框(例如 'Email PDF' 设置为 true。

在用户事件脚本中,在提交销售订单并将 'Email PDF' 设置为 true 后,将交易呈现为 PDF 并通过电子邮件将其发送给所有 'Email To' 收件人。

或者我可能忽略了更好的解决方案?

'duplicate question' 说这不能完成,但我有一个可行的解决方案。它还引用了 SuiteTalk,不一样。

这是有人在 NetSuite 官方论坛上给我的解决方案:

You can accomplish this fairly easily with a Workflow.

- Trigger on Before Record Submit when 'To Be E-mailed' = T
- Set Field Value of 'To Be E-mailed' = F
- Transition to next state After Record Submit
- Use 'Send Email' action. This allows you to use an email template and
  also automatically attach pdf