以 netsuite 形式更改 select 选项
Changing select option in netsuite form
我的 netsuite 表单上有类似这样的内容:
我可以这样得到 select 值:
var origin_port = nlapiGetFieldText('custbodyorigin_port');
我有 table 个物品,我想根据第一个 table 的物品原始值更改此原始端口值。我已经想出了如何获取它并使用 jquery ID select 更新它,或者但我想使用 netsuite API.
有什么方法可以更新这个 select 字段值吗?
类似于
nlapiSetFieldValue("custbodyorigin_port", "some field value", null, true);
或
nlapiSetFieldText("custbodyorigin_port", "some text", null, true);
但不幸的是它对我不起作用...
补充一下:
项目下拉菜单中的可用选项与此正文的来源 post 选项相同。
所以我的问题 -> 有什么方法可以更改 selected 选项吗?我如何使用 netsuite api 做到这一点?
已解决!
解决方案:
nlapiSetFieldText('custbodyorigin_port', "some text here");
我刚刚在设置文本后删除了 2 个参数,它对我有用。
我刚刚在设置文本后删除了 2 个参数,它对我有用。
之前:
nlapiSetFieldText('custbodyorigin_port', "some text here",null,true);
之后:
nlapiSetFieldText('custbodyorigin_port', "some text here");
我的 netsuite 表单上有类似这样的内容:
我可以这样得到 select 值:
var origin_port = nlapiGetFieldText('custbodyorigin_port');
我有 table 个物品,我想根据第一个 table 的物品原始值更改此原始端口值。我已经想出了如何获取它并使用 jquery ID select 更新它,或者但我想使用 netsuite API.
有什么方法可以更新这个 select 字段值吗?
类似于
nlapiSetFieldValue("custbodyorigin_port", "some field value", null, true);
或
nlapiSetFieldText("custbodyorigin_port", "some text", null, true);
但不幸的是它对我不起作用...
补充一下:
项目下拉菜单中的可用选项与此正文的来源 post 选项相同。
所以我的问题 -> 有什么方法可以更改 selected 选项吗?我如何使用 netsuite api 做到这一点?
已解决!
解决方案:
nlapiSetFieldText('custbodyorigin_port', "some text here");
我刚刚在设置文本后删除了 2 个参数,它对我有用。
我刚刚在设置文本后删除了 2 个参数,它对我有用。
之前:
nlapiSetFieldText('custbodyorigin_port', "some text here",null,true);
之后:
nlapiSetFieldText('custbodyorigin_port', "some text here");