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
A
suitescript api
1objRecord.removeLine({2 sublistId: /* string, required */,3 line: /* number, required */,4 ignoreRecalc: /* boolean, optional */5});
| Parameter | Type | Required | Description |
|---|---|---|---|
| options.sublistId | string | required | The internal ID of the sublist. This value is displayed in the Records Browser. For more information, see Working with the SuiteScript Records Browser . |
| options.line | number | required | The line number of the sublist to remove. Note that line indexing begins at 0 with SuiteScript 2.x. |
| options.ignoreRecalc | boolean | optional | If set to true, scripting recalculation is ignored. The default value is false. |
B
mynt syntax
Supported syntax · compiles today
1for line in order.item {2 if line.quantity < 1 {3 remove line4 }5}
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
community proposals
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.
Mynt today
for line in order.item {Loading proposals from GitHub…
D
suggest an alternative
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,saveandRef[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?