I need to set the Ship to Country on a Purchase Order from a custom field on the Sales Order. According to NS documentation, (record browser) the field is a text but clearly in the UI it is a drop down. In the Schema browser, it references a Country list where values are _unitedStates (etc).
I have tried to set it with "United States" as well as _unitedStates and neither works. I get an error saying invalid value and then either of the above.
How can this be done?
Usually drop-down values need to be set using the internal id. I believe the countries list uses 2 character ids where United States, for example, would be "US". Try using "US" and please let me know if that works. This applies if your custom field references the NetSuite built in list of countries as at Setup > Company > Countries. If the custom field references a custom list for some reason, you would need the internal id for that field value, which would be an integer (you could get this from the list record). Hope it helps.