我无法在文档或此处找到答案。是否可以脚本发送语句给客户?谢谢你提供的所有帮助。SuiteScript脚本发送语句
0
A
回答
0
我在SuiteAnswers中找到了它,这足以满足我的目的。
function printStatement()
{
//this is is the customer id
var id = nlapiGetRecordId();
var email = nlapiGetFieldValue('custentity_accounting_email');
//create an array to set the STATEMENT properties(optional)
var sdate = new Array();
sdate.startdate = '11/01/2015'; // replace it as per requirement
sdate.statementdate = '11/30/2015'; // replace it as per requirement
sdate.openonly = 'T'; // replace it as per requirement
sdate.formnuber = 112; // replace it as per requirement
//print the statement to a PDF file object
var file = nlapiPrintRecord('STATEMENT', id, 'PDF', sdate);
//send the PDF as an attachment
nlapiSendEmail('-5', email, 'Regular Statement', 'Please see attached Statment', null, null, null, file); //change the value of author id.
}
2
是的,但使用工作流程更容易。我们为'声明联系人'创建了一个自定义字段,并基于“保存的搜索过滤器”设置了一个计划的工作流程,基本检查客户是否有余额。有一个状态包含一个“发送电子邮件”操作。 “发送电子邮件”操作可以选择“包含声明”。它在每个月的第4天发生 - 您可以将此设置或任何其他参数设置为适合您的任何参数。这对我们很好,所以我希望它能帮助你。
相关问题
- 1. Javascript语句发送密钥
- 2. Bash脚本if语句
- 3. awk脚本中, “if” 语句
- 4. PHP如果语句脚本
- 5. vb脚本如果语句
- 6. bash/shell脚本语句
- 7. SuiteScript 2.0 UserEvent脚本调用Map Reduce
- 8. Bash脚本,OR语句上的语法
- 9. 发送阵列PBS脚本
- 10. 够程渠道 - 发送语句的值
- 11. 不能发送邮件()与if语句
- 12. 向mysql语句发送操作符
- 13. bash脚本语句if语句,比较小数点
- 14. 在关闭文件句柄时向Perl脚本发送信号
- 15. 如何在PHP中触发jQuery脚本if语句
- 16. 我的if语句不被倾听,触发脚本反正
- 17. IF语句批处理脚本
- 18. 凡从CONCAT /工会的脚本语句
- 19. Groovy脚本执行时看到语句
- 20. Bash脚本IF语句不起作用
- 21. 批处理脚本中的IF语句
- 22. MySQL IF语句 - 脚本有错误
- 23. 批处理脚本语句 - 意外(
- 24. 错误,如果使用脚本语句
- 25. CASE语句中的SQL搜索脚本
- 26. 操作脚本3.0 if else语句
- 27. 如果&AND语句在PHP脚本
- 28. 执行语句或运行脚本?
- 29. bash脚本如果语句错误
- 30. 经典ASP中if语句的脚本