在SuiteScript 1.0中,即使脚本已排定,我也会获得NLAPIYIELDSCRIPT_MUST_BE_CALLED_FROM_A_SCHEDULED_SCRIPT。
执行途径:
客户端脚本以管理员身份触发SuiteLet
var sletURL = nlapiResolveURL('SUITELET', 'customscriptjcse_au_da_manual_paymentupd', 'customdeployjcse_au_da_manual_paymentupd',false)+'&userid='+currentUser;
var resp = nlapiRequestURL(sletURL);
Suitelet触发脚本:
var result = nlapiScheduleScript('customscriptjcse_au_da_payment_ss', 'customdeployjcse_au_da_payment_ss_manual', params);
即使对计划的脚本上下文进行日志记录也是如此:
Started at: 20:28:50 GMT-0800 (PST) by User ID: 7880 Context: scheduled
预定的脚本,我有:
if (context.getRemainingUsage() < 250 ) {
nlapiYieldScript();
}
context.setPercentComplete((processed/trancount*100).toFixed(1));
任何想法为什么会出现此错误?