Hello, is there a way to run a search on the in-bu...
# suitescript
a
Hello, is there a way to run a search on the in-built countries (page which shows up when we search 'set up countries' in netsuite search) list using suitescript 1.0? or is there any other way to fetch the list of countries and states from netsuite?
s
What are you trying to do with them in suitescript, the internalid of the country list is
-159
and state list is
-195
a
I want to display the supported country names on my web portal. How to should I fetch the country names using suitescript 1.0?
Thank you for a quick reply.
s
If you want to display them in a field (I dont use 1.0), but I assume there is a spot where you can put
source
in you list/field definition. Just put that internalid in there as the source
a
I don't want to display on my netsuite form. I want to get those country names on our extension.
s
Country enumerations maybe something around there? Not sure
a
is there a way to create a search on enums using suitescript?
a
Are you able to create a search starting from the countries page and / or select the country type when creating a new search?
Maybe things changed but we built a side record for being able to do what you are looking for
a
@Abhishek Dev you could try creating in custom record
I am not sure if that is optimal solution
but I have mapped the country and state using the custom record
a
Me too.... also because an ID <-> locale conversion is always needed in Netsuite...
a
@Andrea Rivetti I could not create a search starting from the countries. I guess I will have to create a custom record.
a
Unfortunately YES. But (not sure is still applicable) if you will inspect a page in where you have the countries select then you will find a JSON which is used for handle the select. So you can create the custom record starting from the JSON -> simple and fast. But why do not use the JSON itself as source of data in your page at this point?
s
^ Yep create custom record(s) once and just use that.