在客户端脚本中使用时如何设置子列表值。我尝试了所有方法,但它不起作用并返回相同的错误。
fieldChanged: function(context){
var record = currentRecord.get();
//var record = context.currentRecord; // not working
if(context.fieldId =='custpage_cancel'){
var objSublist = record.getSublist({ //returns sublist obj but can not set
sublistId: 'custpage_sublist'
});
objSublist.setSublistValue({ // Not working ERROR: objSublist.setSublistValue is not a function
fieldId : 'custpage_id',
line : 0,
value : true
});
// record.setSublistValue({ // Not working ERROR: objSublist.setSublistValue is not a function
// sublistId: 'custpage_sublist',
// fieldId: 'custpage_id',
// line: 0,
// value: true
// });
}
}
Run Code Online (Sandbox Code Playgroud)
错误:截图
有没有适当的方法来获取Netsuite记录中所有内部ID的列表?
var record = nlapiLoadRecord('customer', 1249);
var string = JSON.stringify(record);
nlapiLogExecution('DEBUG', 'string ', string );
Run Code Online (Sandbox Code Playgroud)
我可以使用json字符串获取大多数ID,但我正在寻找一种适当的方法。它打印所有数据,包括内部ID。是否有Api或其他方式?