Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Please note that on Saturday, April 18, 2026, at 8:00 PM Pacific Time, our Case Management System will undergo a scheduled maintenance for approximately 15 minutes. During this time, case creation via SuiteAnswers will be unavailable and inbound calls will be routed to Customer Service.
Transaction Totals without tax?
Hi,
I'm trying to create a script that totals up all sales orders before taxes within this fiscal quarter. I can't seem to find the right search column to get the total without taxes. Here's a snippet of my code:
var statusFilter = new Array(); statusFilter[0] = 'SalesOrd:C'; var filters = new Array(); filters[0] = new nlobjSearchFilter('name', null, 'is', customerInternalID, null); filters[1] = new nlobjSearchFilter('trandate', null, 'within', 'thisfiscalquarter'); filters[2] = new nlobjSearchFilter('status', null, 'noneof', statusFilter, null); filters[3] = new nlobjSearchFilter('mainline', null, 'is', 'T'); var columns = new Array(); columns[0] = new nlobjSearchColumn('amount'); //calculate sales order total var salesOrderResults = nlapiSearchRecord('salesorder', null, filters, columns); //make a grand total if(salesOrderResults != null){ for (var i = 0; i < salesOrderResults.length; i++) { SOtotal = parseFloat(SOtotal) + parseFloat(salesOrderResults[i].getValue('amount')); } } alert("(debug) Sales: "+SOtotal); 0