I'm working on a client script saveRecord event on...
# suitescript
b
I'm working on a client script saveRecord event on assembly build and my sublist length is coming up undefined, there are two components in the sublist, any ideas
Copy code
function saveRecord(context){
            var currentRecord = context.currentRecord;
            var loc = currentRecord.getText({fieldId: 'location'});
            var comps = currentRecord.getSublist('component');
            var lineCount = comps.length; // This is undefined
d
use getLineCount api
example :var iffLineCount = iffRecObj.getLineCount({ sublistId: "item" });
b
wow, I knew that and then forgot it, thanks!