Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
Transaction Line Item Commit
We used the code below for several months and it worked perfectly fine. All it does is mass-update the tax code on an Estimate form.
function FlipTaxesG5()
{
var itemcount = nlapiGetLineItemCount('item') ;
for (var x = 1; x <= itemcount; x++)
{
nlapiSelectLineItem('item',x);
nlapiSetCurrentLineItemValue('item', 'taxcode', 39517, false, true);
nlapiCommitLineItem('item')
}
alert("All line items have been switched to G5.");
}
A little while ago is stopped working. It would only change the tax code on the first line. When I added a debug mark (simple line item alert) it started working again (as seen below). It seems to be related to some refresh or focus that the alert message is causing. Unfortunately I can't exactly deploy a script that causes 10-20 alerts each time it is run.