Discussions
SuiteWorld is the largest annual gathering of the NetSuite community! It will be held in Las Vegas on October 6-9, 2025. Our customers and partners look forward to SuiteWorld every year as a place to hear the latest from NetSuite, get hands-on learning, and connect with each other. Register now!
Insert a discount line
I'm trying to insert a discount line on a quotation via SuiteScript, but failing!
I've got it to populate the item, but I want to use a custom price and set the amount.
So far I have this:
currentRecord.insertLine({sublistId: 'item', line: i+1}); currentRecord.setCurrentSublistValue({sublistId: 'item', fieldId: 'item', value: '978'}) currentRecord.setCurrentSublistValue({sublistId: 'item', fieldId: 'price', value: '-1'}) currentRecord.setCurrentSublistValue({sublistId: 'item', fieldId: 'rate', value: '-10%'}) currentRecord.setCurrentSublistValue({sublistId: 'item', fieldId: 'taxcode', value: 'VAT:20%'}) currentRecord.commitLine({sublistId: 'item'})