Discussions
SuiteWorld is where the NetSuite community comes together to learn, connect, and discover what’s next.
Whether you’re looking for product updates, practical tips, new ways to improve efficiency, or insights from other customers, SuiteWorld offers something for every stage of your NetSuite journey.
■ NetSuite 2026.2 Release Notes
■ NetSuite SuiteApps Release Notes
■ NetSuite Sneak Peeks
■ Release Preview Guide
■ Release Preview Test Plan Template
Duplicate All Line Items on Transaction Record
Hi,
I have been thinking that there should be a sensible way to copy (duplicate) all of the line items on a transaction record (such as an invoice) using a Client Script, but have not been to accomplish this yet.
Logically, I thought that looping through all of the items on the current record object and duplicating each one would be the simplest. In order to avoid manually specifying each and every single field to be updated and set to a value, I thought I would try using the NetSuite method of copying line items...item_machine.copyline().
The part I don't understand is why looping through items and calling this code seems to be extremely slow. It takes ~4 minutes to copy 40 line items. I can copy them almost as fast by manually clicking.