我在医生或这里找不到答案。是否可以编写发送语句给客户的脚本?谢谢你能提供的任何帮助。
发布于 2017-04-18 18:56:40
我在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.
}发布于 2017-04-18 18:54:34
是的,但是使用工作流更容易。我们为“语句联系人”创建了一个自定义字段,并根据“保存的搜索筛选器”设置了一个计划好的工作流,它基本上检查客户是否有平衡。有一种状态包含一个“发送电子邮件”操作。“发送电子邮件”操作可以选择“包含语句”。它在每个月的第四天触发--您可以将此参数或任何其他参数设置为任何适合您的参数。这对我们来说很好,所以我希望它对你有帮助。
https://stackoverflow.com/questions/43479567
复制相似问题