首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >SuiteScript脚本发送语句

SuiteScript脚本发送语句
EN

Stack Overflow用户
提问于 2017-04-18 18:23:31
回答 2查看 884关注 0票数 0

我在医生或这里找不到答案。是否可以编写发送语句给客户的脚本?谢谢你能提供的任何帮助。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2017-04-18 18:56:40

我在SuiteAnswers中找到了这个,这对我的目的来说已经足够了。

代码语言:javascript
复制
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.
}
票数 0
EN

Stack Overflow用户

发布于 2017-04-18 18:54:34

是的,但是使用工作流更容易。我们为“语句联系人”创建了一个自定义字段,并根据“保存的搜索筛选器”设置了一个计划好的工作流,它基本上检查客户是否有平衡。有一种状态包含一个“发送电子邮件”操作。“发送电子邮件”操作可以选择“包含语句”。它在每个月的第四天触发--您可以将此参数或任何其他参数设置为任何适合您的参数。这对我们来说很好,所以我希望它对你有帮助。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43479567

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档