Understand the platform limits: UI-submitted transactions support up to 500 lines; CSV import and SOAP web services support up to 5,000 lines per transaction
For the REST API, create the parent record first, then PATCH sublist lines in batches if your transaction approaches UI limits; test the actual limit for your record type in your account
In SuiteScript, use record.insertLine() and record.setCurrentSublistValue() in a loop; commit the record with record.save() only after all lines are staged to avoid partial saves
For very large line counts, consider splitting the transaction across multiple records (e.g. multiple purchase orders) or using CSV import via the N/task module in SuiteScript
Log the number of lines before saving and alert if approaching limits to prevent silent truncation or errors
Known gotchas
The 500-line UI limit and 5,000-line CSV/SOAP limit are documented platform maximums; actual behaviour can vary by record type and account configuration — validate in your sandbox
Sublists in the REST API are represented as nested arrays; some sublist fields are read-only via REST even though they are editable in the UI or via SuiteScript
Attempting to save a transaction that exceeds the line limit via the REST API returns a generic 400 error, not a specific 'line limit exceeded' message — always check count before calling save
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp