Lorenzo
02/06/2025, 3:14 PMCeligo AI
02/06/2025, 3:15 PMAI generated answer (using internal Slack threads):To set a sales order to be tax-free regardless of the item tax rate, you can use a SuiteScript to set the
taxcode
field to a non-taxable tax code for each line item in the sales order.
Here is a sample SuiteScript 2.0 code snippet that sets the taxcode
field to a non-taxable tax code for each line item in a sales order:
javascript
var salesOrderRecord = record.load({
type: record.Type.SALES_ORDER,
id: 'your_sales_order_id'
});
var lineCount = salesOrderRecord.getLineCount({
sublistId: 'item'
});
for (var i = 0; i < lineCount; i++) {
salesOrderRecord.setSublistValue({
sublistId: 'item',
fieldId: 'taxcode',
line: i,
value: 'your_non_taxable_tax_code'
});
}
salesOrderRecord.save();
Replace 'your_sales_order_id'
and 'your_non_taxable_tax_code'
with your actual sales order ID and non-taxable tax code respectively.
Please note that this script should be executed in a context where it has the necessary permissions to load and edit sales orders.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
02/06/2025, 3:15 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.811497569
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.808339238
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.807583
Celigo AI
02/06/2025, 3:15 PM