starlingMark
02/17/2026, 4:10 PMCraig Haroldson
02/17/2026, 4:13 PMstarlingMark
02/17/2026, 4:22 PMCraig Haroldson
02/17/2026, 4:23 PMdarrenhillconsulting
02/17/2026, 7:16 PMstring version of findSublistLineWithValue, and if THAT fails, we perform our own loop lookup. You can never be too carfeul!starlingMark
02/17/2026, 7:17 PMdarrenhillconsulting
02/17/2026, 7:36 PMdarrenhillconsulting
03/12/2026, 1:18 PMstarlingMark
03/12/2026, 1:19 PMstarlingMark
03/12/2026, 1:20 PMCraig Haroldson
03/12/2026, 1:35 PMdarrenhillconsulting
03/12/2026, 3:11 PMstarlingMark
03/12/2026, 3:47 PMdarrenhillconsulting
03/12/2026, 4:48 PMstarlingMark
03/12/2026, 4:51 PMdarrenhillconsulting
03/12/2026, 4:52 PMLast Updated valuestarlingMark
03/12/2026, 4:52 PMdarrenhillconsulting
03/12/2026, 4:52 PMUpon initial investigation, the behavior of how values are accepted in the findSublistLineWithValue(options) function changed with the 2026.1 update. This change was undocumented prior to this release.
SuiteAnswer 45391 - options.value: number | Date | string | array | boolean
The specification defines the types accepted by the method but does not guarantee implicit conversion to the target field type.
Behavior by Release:
- 2025.2: Implicit number ā string conversion (undocumented behavior)
- 2026.1: Strict type matching per field type (NUMBER field requires a number value)
The 2026.1 behavior aligns with the field definition (refnumber: NUMBER) and with the technical expectation of type-safe matching. The automatic conversion observed in 2025.2 was an undocumented implementation detail.
To fix the issue, you may need to ensure that the value type you pass to the function matches the field type. For example:
var lineNumber = objRecord.findSublistLineWithValue({
sublistId: 'item',
fieldId: 'item',
value: Number(itemInternalId)
});starlingMark
03/12/2026, 4:53 PMstarlingMark
03/12/2026, 4:54 PMdarrenhillconsulting
03/12/2026, 5:23 PMdarrenhillconsulting
03/12/2026, 5:23 PMtrue (rather than 'T') when checking booleansdarrenhillconsulting
03/12/2026, 5:24 PMstarlingMark
03/12/2026, 5:39 PMstarlingMark
03/12/2026, 5:44 PMdarrenhillconsulting
03/12/2026, 6:08 PMstarlingMark
03/12/2026, 6:16 PMdarrenhillconsulting
03/12/2026, 6:38 PMWatz
04/14/2026, 12:31 PMlineId
Apparently the field line is a string according to getSublistLineWithValue but it is a number according to getSublistValue
š” netsuiteWatz
04/14/2026, 12:32 PMdarrenhillconsulting
04/14/2026, 3:35 PMWatz
04/14/2026, 4:08 PMdarrenhillconsulting
04/14/2026, 4:10 PMWatz
04/15/2026, 10:16 AMgetSublistValue() on the record.Record before running findSublistLineWithValue()
require(['N/record','N/format'], function(record, format){
const searchOptions = { sublistId: 'expense', fieldId: 'custcol_eqt_test_date_field' }
const stringValue = '2026-03-24'
const id = 16239148
const type = 'vendorbill'
function logger(optionA, optionB) {
if(typeof window !== "undefined") {
console.log(optionA, optionB)
} else {
log.debug(optionA, optionB)
}
}
const rec = record.load({ type, id })
const getValue = rec.getSublistValue({ ...searchOptions, line: 0 })
const findWithString = rec.findSublistLineWithValue({ ...searchOptions, value: stringValue })
const findWithDate = rec.findSublistLineWithValue({ ...searchOptions, value: new Date(stringValue) })
logger('results - running getValue before findSublistLineWithValue', { getValue , findWithString , findWithDate })
const rec2 = record.load({ type, id })
const findWithString2 = rec2.findSublistLineWithValue({ ...searchOptions, value: stringValue })
const findWithDate2 = rec2.findSublistLineWithValue({ ...searchOptions, value: new Date(stringValue) })
const getValue2 = rec2.getSublistValue({ ...searchOptions, line: 0 })
logger('results - running getValue after findSublistLineWithValue', { getValue2 , findWithString2 , findWithDate2 })
const bp = 2 //breakpoint
})Watz
04/15/2026, 11:37 AMline it doesn't. I'm guessing that line is some construct from transactionline.id where it is cast as a string. And I guess that if the field is a string, you have to supply a string.
lineuniquekey works with both string and number.
confused dog