jkabot
02/17/2020, 9:32 PMconst line = rec.getCurrentSublistIndex({ sublistId: 'item' });
const max = rec.getLineCount({ sublistId: 'item' });
// if the current line is a new line that has not been commited, then line === max
// and getSublistField throws an error SSS_INVALID_SUBLIST_OPERATION
if (0 <= line && line < max) {
// safely use rec.getSublistField
}