Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
address fields on before submit create
Hi,
When I create a record my script is not finding the address variables. When I edit it the code works fine.
I tested this by hardcoding the address variables in my script at which point it worked on create.
Example of create (not working)
if (type == 'create' || type == 'edit') { var record = nlapiGetNewRecord(); //need to lookup: city, state, zipcode var customerCity = record.getFieldValue('billcity'); var customerState = record.getFieldValue('billstate'); Example hard coded which works on create
if (type == 'create' || type == 'edit') { var record = nlapiGetNewRecord(); //need to lookup: city, state, zipcode var customerCity = 'chicago'; var customerState = 'illinois'; 0