Anyone know how to get all the relevant values of ...
# suitescript
e
Anyone know how to get all the relevant values of a Country and State? Currently I can get the numeric ID and the long name, but
setValue
on an Address subrecord expects the short name/abbreviation
e
EHC_LIB_States.js
I couldn't find a way, so
e
So what I'm hearing is "no, not natively"
I'm not even sure why I'm getting a numeric ID for countries at all
p
Funny enough these values are exposed for SuiteCommerce apis
("states" too)
e
per Help:
SuiteScripts generally reference countries using ISO country codes, which are not maintained by NetSuite. Some SuiteScript APIs may also reference country names.
p
That's OK for countries, states is not so straightforward i guess
at least by looking at the Abbr values some have
e
@stalbert Thanks for sharing; I've adapted the module for my old-timey javascript
s
šŸ™‚
e
Also found this from @Marty Zigman while adapting @ehcanadian’s module: https://blog.prolecto.com/wp-content/uploads/2015/03/netsuite-country-state-list-20150330.js
which helped me generate this JSON of all States in NS
šŸ‘ 1
150 Views