Discussions
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
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"})