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
Getting customer record info from a client-side script running on Sales Order
We re-purposed this snippet from existing working code, but we can't get back anything from the child customer record of the sales order.
This is part of the function we are running at "save record". The first three alerts display correctly, then NS gives us "cannot submit this form due to an unexpected error" without displaying the customer email alert popup.
function setShipMethodAndCost()
{
var subTotal = nlapiGetFieldValue( 'subtotal' );
var shipMethod = nlapiGetFieldValue( 'shipmethod' );
var customerInternalID = nlapiGetFieldValue('entity');
alert(subTotal);
alert(shipMethod);
alert(customerInternalID);
var filters = new Array();
filters[0] = new nlobjSearchFilter('internalid', null, 'equalto', customerInternalID , null );
var customerRecord = nlapiSearchRecord('customer', null, filters, null );