在SuiteScript中设置国家 [英] Setting Country in SuiteScript

查看:76
本文介绍了在SuiteScript中设置国家的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从销售订单上的自定义字段中将采购订单上的发运国家/地区"设置为国家/地区".根据NS文档,(记录浏览器)该字段是文本,但在UI中显然是一个下拉列表.在模式浏览器中,它引用国家/地区"列表,其中值是_unitedStates(等).

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).

我尝试将其设置为美国"以及_unitedStates,但均无效.我收到一个错误消息,说无效值,然后是以上任何一个.

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.

这怎么办?

推荐答案

通常,需要使用内部ID设置下拉值.我认为国家/地区列表使用2个字符ID,例如美国为"US".尝试使用美国",如果可以,请告诉我.如果您的自定义字段引用NetSuite内置的国家/地区列表(如设置">公司">国家/地区"),则适用此规则.如果自定义字段出于某种原因引用了一个自定义列表,则需要该字段值的内部ID,该ID应该是整数(可以从列表记录中获取).希望对您有所帮助.

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.

这篇关于在SuiteScript中设置国家的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆