Any recommendations on how to create an invoice pr...
# suitescript
e
Any recommendations on how to create an invoice programmatically with about 1500 lines? Currently using a restlet with POST JSON payload. It seems the official limit is only 200 lines: https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/article_159361107074.html#Limitations-for-Creating-Transactions
s
Those limits apply to UI. You should look at “Limitations for Importing Transactions” topic and if I’m not mistaking limits for SOAP Import applies to SuiteScript as well.
s
Even though scripting may allow you to exceed those line limits, consider carefully the impact of it. If someone later has to edit or just view that invoice, or if another script has to run on it, the excessive number of lines can still cause issues in the future, with long wait times, or scripts running out of governance. NetSuite even warns you that more than 1,000 lines can cause issues.
z
If you can, it's better off splitting it into multiple invoices. You can then create a custom pdf that brings them back together if the customer needs.
e
FTR, 1500 lines using POST takes about 6 minutes in sandbox