我是这个netsuite的新手 . 我需要从用户事件脚本调用调度脚本,然后在调度脚本中检索传递的param值 . 我正在尝试这段代码:
// before submit
function userEventBeforeSubmit(type) {
if (type == 'edit') {
var recId = nlapiGetRecordId();
var params = new Array();
params['custscript_recordid'] = recId;
var status = nlapiScheduleScript('customscript_req_schedule','customdeploy1', params);
nlapiLogExecution('DEBUG', 'Status', status);
}
}
在预定的脚本上:
function scheduled(type) {
if (type == 'userinterface' || type == 'scheduled' || type == 'ondemand') {
nlapiLogExecution('DEBUG', 'Scheduled Script', type);
var parentId = nlapiGetContext().getSetting('SCRIPT','custscript_recordid');
....
...
}
但是我无法检索预定脚本的值 . 在日志中它显示为空白 . 任何人都可以帮我解决一下,上面的代码出了什么问题?
先感谢您 .