If i’m adding a field in a Suitelet using form.add...
# general
m
If i’m adding a field in a Suitelet using form.addField(), does anyone know how to reference native NetSuite lists like country or state? I’m having trouble finding what to put in the source property for these.
b
create a custom select field with the list/record you are looking for
get the value using suitescript and that will be the internal id you use
i use
Copy code
nlapiGetFieldValue('selectrecordtype')
prepare to be disappointed. The country list values are internal id numbers, not iso codes
m
I think you have to reference the list though, not the field, right?
b
the internal id value of
selectrecordtype
will be an internal id number that can be used as the source
its not documented anywhere but experimentation shows that it currently works
m
ok i’ll try that. thanks