@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.