Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
Slaes Order Field Change
Hello Everyone, I have created the script below to set price at sales order level as the the lines are added. However it does not trigger.
The Purpose of the script is to set the price level of each line in a dynamic fashion by comparing against the price level selected in body of the sales order. The Sales order body field is using a custom record list.
function validateLine(scriptContext) {
var currentRecord = scriptContext.currentRecord;
var sublistName = scriptContext.sublistId;
var sublistFieldName = scriptContext.fieldId;
var price_Level = currentRecord.getValue({
fieldId: 'custbody_price_level'
});
if(sublistName == 'item' && sublistFieldName == 'price'){
var count = currentRecord.getLineCount({