Watz
09/27/2023, 5:48 AMsuitedev
09/27/2023, 6:06 AMsetValue()
Watz
09/27/2023, 6:19 AMNickSuite
09/27/2023, 7:48 AMWatz
09/27/2023, 8:12 AMconsole.time('loopy')
//const queryResult = [
// {fieldId1: value, fieldId2: value}
//]
queryResult.forEach((result, index) => {
//currentRecord.selectNewLine({ sublistId });
Object.entries(result).forEach(([fieldId, value]) => {
nlapiSetLineItemValue(sublistId, fieldId, index+1, value)
//currentRecord.setCurrentSublistValue({ sublistId, fieldId, value, ignoreFieldChange: true });
});
//currentRecord.commitLine({ sublistId });
});
console.timeEnd('loopy')
NickSuite
09/27/2023, 8:29 AMWatz
09/27/2023, 8:31 AMNickSuite
09/27/2023, 9:07 AMWatz
09/27/2023, 9:07 AMWatz
09/27/2023, 9:08 AMNickSuite
09/27/2023, 9:08 AMWatz
09/27/2023, 9:09 AMconst recmach = getMachine(sublistId)
recmach.insertdata([[...the_data].join(String.fromCharCode(1))].join(String.fromCharCode(2)),0)
recmach.recalc()
recmach.buildtable()
You can get how the_data
should look like with recmach.getLineArray()NickSuite
09/27/2023, 9:10 AMnlapiSetLineItemValue(sublistId, fieldId, index+1, value)
See if this works independently - if you still want to use this.Watz
09/27/2023, 9:18 AMrecmach.getFieldIdxMap()
Watz
09/27/2023, 9:25 AMnlapiSetLineItemValue(sublistId, fieldId, index+1, value)
doesn't do anything when executed it in the console.NickSuite
09/27/2023, 9:30 AMWatz
09/27/2023, 9:31 AMNickSuite
09/27/2023, 9:31 AMWatz
09/27/2023, 9:31 AMNickSuite
09/27/2023, 9:31 AMWatz
09/27/2023, 9:31 AMNickSuite
09/27/2023, 9:31 AMWatz
09/27/2023, 9:32 AMNickSuite
09/27/2023, 9:33 AMWatz
09/27/2023, 9:33 AMWatz
09/27/2023, 9:35 AMNickSuite
09/27/2023, 9:36 AMNickSuite
09/27/2023, 9:36 AMNickSuite
09/27/2023, 9:37 AMWatz
09/27/2023, 9:37 AMNickSuite
09/27/2023, 9:37 AMconst recmach = getMachine(sublistId)
recmach.insertdata([[...the_data].join(String.fromCharCode(1))].join(String.fromCharCode(2)),0)
recmach.recalc()
recmach.buildtable()
Watz
09/27/2023, 9:38 AMWatz
09/27/2023, 9:42 AMsuitedev
09/27/2023, 3:39 PMTyn Guardian
11/22/2023, 12:20 PMWatz
11/22/2023, 12:26 PMTyn Guardian
11/22/2023, 12:28 PM