Did you select the line first? `rec.selectNewLine(...
# suitescript
m
Did you select the line first?
rec.selectNewLine('listname', index);
or
rec.selectLine('listname', index);