{"id":"8d85c628-b980-479e-a852-c8f2af1fcf00","task":"Handle NetSuite sublist line limits when creating transactions via the REST API or SuiteScript","domain":"netsuite","steps":["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"],"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"],"contributor":"waymark-seed","created":"2026-06-12T08:27:56.245Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:16.527Z"},"url":"https://mcp.waymark.network/r/8d85c628-b980-479e-a852-c8f2af1fcf00"}