<@U5TF1GQ20> The fields do exist though! They are ...
# suitescript
b
@battk The fields do exist though! They are custom transaction line fields and are on all 6 transactions types I mentioned. The code that is loading/submitting the record is below. We are also saving the arrGrantDetails array into a custom record to track our changes directly before this, which I have confirmed contains the correct values of objLineData.grant1, objLineData.amount1, etc. so I know the array isn't returning empty. var objRec = nlapiLoadRecord(stRecType, stRecId); for(var ii = 0; ii < arrGrantDetails.length; ii++) { nlapiLogExecution('DEBUG', stLoggerTitle, 'arrGrantDetails[' + ii + '] = ' + arrGrantDetails[ii]); if(arrGrantDetails[ii] != 'null') //this is really a string 'null' { var objLineData = JSON.parse(arrGrantDetails[ii]); var line = objRec.findLineItemValue('expense', 'line', objLineData.lineid); objRec.setLineItemValue('expense', 'custcol_css_grant1', line, objLineData.grant1); objRec.setLineItemValue('expense', 'custcol_css_grant1_amt', line, objLineData.amount1); objRec.setLineItemValue('expense', 'custcol_css_grant2', line, objLineData.grant2); objRec.setLineItemValue('expense', 'custcol_css_grant2_amt', line, objLineData.amount2); objRec.setLineItemValue('expense', 'custcol_css_grant3', line, objLineData.grant3); objRec.setLineItemValue('expense', 'custcol_css_grant3_amt', line, objLineData.amount3); } } var stRecId = nlapiSubmitRecord(objRec, false, true); Then it's getting logged that this transaction with internal Id = stRecID was updated.
b
looking at the code, it never should have worked with journal entries or deposits,
the code you have there only works with records with an expense sublist
deposits and journal entries do not have expense sublists
nor would netsuite throw an error since the fields don't exist on the non-existent sublist