Jared Fraley
09/08/2023, 2:34 AMdepositRecord.selectNewLine({ sublistId: 'payment' });
Result: SSS_INVALID_SUBLIST_OPERATION
I think works but causes perpetual "Record changed" error:
depositRecord.selectLine({
sublistId: 'payment',
line: i
});Anthony OConnor
09/08/2023, 2:41 AMAnthony OConnor
09/08/2023, 2:47 AMJared Fraley
09/08/2023, 3:41 PMvar lineNumber = depositRecord.findSublistLineWithValue({
sublistId: 'payment',
fieldId: 'id',
value: relTransId
});
log.debug({
title: "lineNumber for " + relTransId,
details: lineNumber
});
depositRecord.setSublistValue({
sublistId: 'payment',
fieldId: 'id',
line: lineNumber,
value: relTransId,
});
depositRecord.setSublistValue({
sublistId: 'payment',
fieldId: 'deposit',
line: lineNumber,
value: true,
});Jared Fraley
09/08/2023, 3:42 PMformattedDate = format.format({
value: new Date(disbursementDate), // Assuming disbursementDate is in a valid date format
type: format.Type.DATE
});
Debug Log: 8/10/2023
Error:
"type":"error.SuiteScriptError","name":"INVALID_FLD_VALUE","message":"Invalid date value (must be M/D/YYYY)"Jared Fraley
09/08/2023, 3:48 PM