We can source the country list into a select field of a suitelet form by sourcing “-159”. Example: let countryField = form.addField({ id: ‘custpage_jj_country’, label: ‘Country’, type: serverWidget.FieldType.SELECT, source: “-159” }); NB: The value returned from this select option would be an integer. Convert the integer into the ISO format if the country’s code is… Continue reading Source the Country List into a SELECT field in suitelet script
Tag: country field
Get Country IDs and Country Names on SuiteScript
Scenario This article describes how to get all countries defined in NetSuite via SuiteScript. This is possible by creating a Custom Record type and Custom Field with List/Record of Country. The sample script is also best executed in User Event: Before Load. Solution Create Custom Record Type 1. Navigate to Customization > Lists Records &… Continue reading Get Country IDs and Country Names on SuiteScript
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… Continue reading Setting Values to a Country List/Record Field