Record object method · N/record

removeLine()

Record.removeLine(options)

Removes a sublist line.

Implementation
Implemented published in npm 0.0.1
Design
Accepted remove line
Proposals
A
Signature
Record.removeLine(options)
Module
N/record
Returns
record.Record
Governance
None
Script types
Client and server scripts
Version
SuiteScript 2.x, documented for 2.1; since NetSuite 2015.2
call shapefrom Oracle's parameter table
1objRecord.removeLine({2    sublistId:    /* string, required */,3    line:         /* number, required */,4    ignoreRecalc: /* boolean, optional */5});
Oracle reference for this method
ParameterTypeRequiredDescription
options.sublistIdstringrequiredThe internal ID of the sublist. This value is displayed in the Records Browser. For more information, see Working with the SuiteScript Records Browser .
options.linenumberrequiredThe line number of the sublist to remove. Note that line indexing begins at 0 with SuiteScript 2.x.
options.ignoreRecalcbooleanoptionalIf set to true, scripting recalculation is ignored. The default value is false.
B

Supported syntax · compiles today

myntremove line
1for line in order.item {2    if line.quantity < 1 {3        remove line4    }5}
suitescriptoutput, trimmed
1let line$index = 0;2while (line$index < order.getLineCount({ sublistId: "item" })) {3    let line$removed = false;4 5    if (6        order.getSublistValue({7            sublistId: "item",8            fieldId: "quantity",9            line: line$index10        }) < 111    ) {12        order.removeLine({13            sublistId: "item",14            line: line$index15        });16        line$removed = true;17    }18 19    if (!line$removed) {20        line$index += 1;21    }22}

A loop that removes its own line advances only when the line stays, so no line is skipped. Published on npm since 0.0.1. Verified with mynt build on 13 Oct 2026.

C

Competing syntax for removeLine, from GitHub Discussions. Select two or more to compare them side by side, with the syntax Mynt supports today as a baseline.

All discussions
Mynt todayfor line in order.item {

Loading proposals from GitHub…

D

Write the Mynt you wish you could write.

A good proposal shows the syntax, the SuiteScript it should become, and argues for it: why it is clearer, how it fits the rest of the language, what it makes harder.

  • Clarity. Does it say what happens, without ceremony?
  • Consistency. Does it read like load, save and Ref[field]?
  • Expressiveness. Does it cover the cases people actually write?
  • Honesty. Does it hide a NetSuite cost, such as governance, that a reader should see?

N/record · Record.removeLine(options)

Suggest syntax for removeLine