Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
Don’t miss your chance to meet our SuiteGurus—NetSuite Support professionals and subject matter experts with extensive experience in select product areas, including OneWorld, Advanced & Basic Accounting, Supply Chain Management, Receivables & Payables, CRM, Account Administration, and the SuiteCloud Platform. Full Conference attendees can prebook exclusive 30-minute one-on-one sessions for your product questions.
Spots are limited! Register through your Agenda Builder and find SuiteGuru under Agenda Enhancements.
Can't get State and Country from Sales Order
How do I get address info from the customer record?
This is what I am trying right now.
var customerID = nlapiGetFieldValue( 'entity' );
alert('Customer internal ID '+customerID)
var filters = new Array();
filters[0] = new nlobjSearchFilter('internalid', null, 'anyof', 'customerID' , null );
var customerRecord = nlapiSearchRecord('customer', null, filters, null );
alert('Customer record is '+customerRecord)
for ( var i = 1; i <= customerRecord.nlapiGetLineItemCount('addressbook' ); i++ );
{
var isDefaultShipping = customerRecord.nlapiGetLineItemValue( 'addressbook', 'defaultshipping', i )
if ( isDefaultShipping == 'T')
{
var shipCountry = customerRecord.nlapiGetLineItemValue( 'addressbook', 'country', i )
var shipState = customerRecord.nlapiGetLineItemValue( 'addressbook', 'state', i )
}
}
alert('Customer country is '+country)
alert('Customer country is '+state)