Setting Country in SuiteScript

我们两清 提交于 2019-12-11 06:13:26

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/43680785/setting-country-in-suitescript

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!