提问人:TheIronKing 提问时间:6/28/2022 更新时间:7/1/2022 访问量:180
TypeError log.debug 不是功能
TypeError log.debug is not a fucntion
问:
下面的脚本抛出错误 “JS_异常 - TypeError log.debug 不是函数”
我基本上想在用户在销售订单上输入行时将价格水平设置为“自定义”。
帮助感谢。谢谢。
/**
* @NApiVersion 2.1
* @NScriptType ClientScript
* @NModuleScope SameAccount
*/
define(['N/search', 'N/log'], (search, log) => {
function fieldChanged(scriptContext) {
const sublistVal = scriptContext.sublistId;
if (sublistVal === 'item') {
try {
rec.setCurrentSublistValue({
sublistId: sublistVal,
fieldId: 'price_value',
value: 'custom',
ignoreFieldChange: true
});
} catch(e) {
log.debug({
title: 'Error',
details: 'Unable to set price level'
});
}
}
}
return {
fieldChanged: fieldChanged
};
});
答: 暂无答案
评论