netsuite - 通过脚本跟踪收到的电子邮件
问题描述
我有一个用户事件脚本,当从案例记录发送新邮件时,它会将案例记录状态更改为“等待信息”。但是当有人回复该邮件时,我希望脚本再次将状态更改为“已接收”。用户可以从 gmail 或 Outlook 回复。
如何跟踪从 netsuite 外部收到的邮件。
var loadCase = record.load({
type: nRecType,
id: recordid
})
if(context.type == context.UserEventType.CREATE || context.UserEventType.EDIT)
{
var messagenew = objRecord.getValue('messagenew');
if(messagenew == true)
{
var question = objRecord.getValue('incomingmessage');
log.debug('N','question : '+question);
if(question == '' || question == null)
{}
else
{
loadCase.setValue({
fieldId: 'status',
value: 8 //waiting for info
})
}
}
loadCase.save();
}
}return {
afterSubmit: afterSubmit
};
解决方案
在 NS 中,当客户回复从案例发送的电子邮件时,NS 将重新打开案例,状态为:Re-Opened [open stage]。您只需将“等待信息”状态设置为一个阶段。您甚至可以将“重新打开”重命名为“已接收”。对于“跟踪从外部收到的邮件”,可能需要一个脚本。这取决于您要如何跟踪它们。
推荐阅读
- java - HTTP CURL 有效 - Java Jsoup 无效
- java - 我如何计算输入后要确定的两个用户输入之间的天数?
- r - 如何删除R中文本文件的最后一行?
- postgresql - 如何在与 ASP.NET Core 的事务中将数据从 CSV 文件导入 Postgres 数据库?
- python - 带有联合的 Python 泛型
- python - 关于python中的情节的问题
- android - 如何实现类似于 Hotjar 的会话记录,但针对移动应用程序
- javascript - 流中的 JavaScript GET 请求网页图像
- java - Firebase 身份验证突然停止工作
- javascript - ReferenceError:初始化前无法访问“嵌入”