2
我想使用JS脚本在netsuite上自定义批量更新,但它不工作。Netsuite - 设置部门的行项目值
代码:
function updateDepartment(rec_type, rec_id)
{
var transaction = nlapiLoadRecord(rec_type, rec_id);
transaction.setLineItemValue ('item','department', nlapiGetContext().getSetting('SCRIPT','custscript_dept_update'));
nlapiSubmitRecord(transaction, false, true);
}
你好,我使用下面的代码,它的工作原理,但没有改变部门。 'function updateDepartment(rec_type,rec_id) { \t var transaction = nlapiLoadRecord(rec_type,rec_id); var dept = nlapiGetContext()。getSetting('SCRIPT','custscript_dept_update');对于(var i = transaction.getLineItemCount('item'); i> 0; i - ){ transaction.setLineItemValue('item','department',i,dept); } \t \t}' –
您仍然需要提交您加载的记录;你的问题中有'nlapiSubmitRecord',但是我没有在你的评论中看到它。 – erictgrubaugh
也没有显示加载记录代码。 – bknights