Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
NetSuite has launched SuiteSuccess Wholesale Distribution Edition, in Japan. Please join us the webinar on February 12 that introduces NetSuite solution with demos and case studies for Wholesale Industry.
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 );