What would be the value of line ``` const custR...
# suitescript
c
What would be the value of line
Copy code
const custRec = record.create({type: 'customsale109', isDynamic: true});
    
    for (let x = 0; x < 3; x++){
     custRec.selectNewLine({sublistId: 'item'});
     custRec.setCurrentSublistValue('item', 'item', 20884+x);
     custRec.commitLine({sublistId: 'item'});
    }
    const custRecId = custRec.save();
    
    // consider on the execution of aboveline few kit component items included in the record
    
    var lines = custRec.getLineCount({sublistId: 'item'})
n
you would need to reload the record since you have saved it to reliably pickup the line count.