Discussions
SuiteWorld is the largest annual gathering of the NetSuite community! It will be held in Las Vegas on October 6-9, 2025. Our customers and partners look forward to SuiteWorld every year as a place to hear the latest from NetSuite, get hands-on learning, and connect with each other. Register now!
NetSuite Tip - Setting Values to a Country List/Record Field
In Netsuite, the Standard Country list's internal id cannot be seen through UI. We need to find the internal id of the country we are about to set to the field
Solution
Get the country value from any of the Netsuite records and store it in a variable
For ex: Pulling ship country from sales order and setting that value to a country list/record custom field of a custom record.
Added a code snippet below
var shipCountry=salesorder.getValue('shipcountry) //or retreive from the address book
var stateSearchObj = _search.create({
type: "state",
filters:
[
["country","anyof",shipCountry]
],
columns:
[
_search.createColumn({name: "country", label: "Country"})