gpt4 book ai didi

netsuite - 获取多个 "formula"列的已保存搜索值

转载 作者:行者123 更新时间:2023-12-02 22:06:41 24 4
gpt4 key购买 nike

早安专家,

我在 Netsuite 中保存了一个带有多个“公式”列的搜索。

比如有几个formulapercent' named columns, although the每个标签都是独一无二的。

但是当使用 nlobjSearchResult.getValue('formulapercent') 时当然,我只得到第一个公式百分比列值。

如何在 getValue 中指定我想要返回哪个公式列的值?

我真的不想使用列号,以防我稍后需要在 Netsuite 中保存的搜索中插入新列。

希望有类似 nlobjSearchResult.getValue('formulapercent','<label>') 的东西

我尝试过多参数选项,但不起作用。

简单的修复?

干杯

史蒂夫

最佳答案

我通常做的是将标签添加到保存的搜索公式列。然后:

var f1Val, f2Val, etc;
results.forEach(function(res){
var cols = res.getAllColumns();
cols.forEach(function(col){
switch(col.getLabel()){
case 'formula1' : f1Val = res.getValue(col); break;
case 'formula2' : f2Val = res.getValue(col); break;
...
}
});
});

关于netsuite - 获取多个 "formula"列的已保存搜索值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42405308/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com