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!
SuiteScript: Script stopped running after SuiteBilling Installation
I have a script that runs on the Sales order after submit, that updates the lines to have a 50% billing schedule on the. This code has worked fine without any issues but we have just installed SuiteBilling and now my code does not work anymore. Any ideas why this might be?
//Find out how many line items there are
var salesorderitems = (loadrec.getLineCount({sublistId: 'item'}))
//Loop through each line item on the Sales Order
//Set counter
var counter = 0
while (counter < salesorderitems){
loadrec.selectLine({sublistId:'item',line: counter})
loadrec.setCurrentSublistValue({
sublistId:'item',
fieldId: 'billingschedule',
value: 9
})
loadrec.commitLine({sublistId:'item'})
counter ++
}