Heya folks, I know there are several buttons in Netsuite that can enter in multiple line items at a time into a transaction, client side. Is there any way to do this with client side Suitescript? Trying to avoid having to add lines individually since it either breaks sourcing if you do it really quickly, or it is really slow as you wait for sourcing to finish.
c
christianRILECPQ
11/19/2025, 5:54 AM
A client-side SuiteScript can batch lines, but sourcing’s the bottleneck. You can use nlapiSetLineItemValue in a loop, but it’ll still trigger sourcing per line. One workaround: disable sourcing temporarily with nlapiDisableLineItemField, add all lines, then re-enable.
m
Michael Pope
11/19/2025, 5:01 PM
@christianRILECPQ Hmmm... I'll try this and see how it works.
Michael Pope
11/19/2025, 6:05 PM
Found a way to get things to work. The trick is to make every nlapiSetCurrentLineItemValue synchronous
Michael Pope
11/19/2025, 6:05 PM
If it is synchronous, I don't have to guess and wait for how long a line will take to be filled. I can just do it as fast as the function returns, which ends up being faster than trying to time things correctly.
Michael Pope
11/19/2025, 6:06 PM
It does freeze up the record for a bit, but this actually might be okay with our users for this particular script