Netsuite SuiteScript > Search Advance feature,搜索中使用 'OR' operation
Sample in online help //Define search filter expression
var filterExpression = [ [ 'trandate', 'onOrAfter', 'daysAgo90' ],
'or',
[ 'projectedamount', 'between', 1000, 100000 ],
'or',
'not', ['customer.salesrep', 'anyOf', -5 ] ] ; //Define search columns
var columns = new Array();
columns[0] = new nlobjSearchColumn('salesrep');
columns[1] = new nlobjSearchColumn('expectedclosedate');
columns[2] = new nlobjSearchColumn('entity'); //Execute the search. You must specify the internal ID of the record type.
var searchresults = nlapiSearchRecord('opportunity', null, filterExpression, columns); 由于nlobjSearchFilter默认发出的都是‘AND’的指令,所以这个api,无法完成or的操作。
By default, search filter list (nlobjSearchFilter[]) makes use only of an implicit ‘AND' operator for filters. This is contrary to search filter expression that can explicitly use either ‘AND' or ‘OR' operators.
[ 'trandate', 'onOrAfter', 'daysAgo90' ],
'or',
[ 'projectedamount', 'between', 1000, 100000 ],
这种操作参数,直接不适用nlobjSearchFilter,而且没有reference其他record的功能;
整个API还是低于UI的USE EXPRESSIONS功能的。
所以另外方案
1。在UI上定义这类OR或者或者包含Parens的Search,然后suitescript去直接调用结果。
2。使用多个Search,消耗更多的unit来实现复杂的单个Search。
Netsuite SuiteScript > Search Advance feature,搜索中使用 'OR' operation的更多相关文章
- How to create a zip file in NetSuite SuiteScript 2.0 如何在现有SuiteScript中创建和下载ZIP压缩文档
Background We all knows that: NetSuite filecabinet provided a feature to download a folder to a zip ...
- NetSuite SuiteScript 2.0 export data to Excel file(xls)
In NetSuite SuiteScript, We usually do/implement export data to CSV, that's straight forward: Collec ...
- CVPR2021| 行人搜索中的第一个anchor-free模型:AlignPS
论文地址:https://arxiv.org/abs/2103.11617 代码地址:https://github.com/daodaofr/AlignPS 前言: 本文针对anchor-free模型 ...
- Beam Search(集束搜索/束搜索)
找遍百度也没有找到关于Beam Search的详细解释,只有一些比较泛泛的讲解,于是有了这篇博文. 首先给出wiki地址:http://en.wikipedia.org/wiki/Beam_searc ...
- [原创]用“人话”解释不精确线搜索中的Armijo-Goldstein准则及Wolfe-Powell准则
[原创]用“人话”解释不精确线搜索中的Armijo-Goldstein准则及Wolfe-Powell准则 转载请注明出处:http://www.codelast.com/ line search(一维 ...
- 【LeetCode-面试算法经典-Java实现】【079-Word Search(单词搜索)】
[079-Word Search(单词搜索)] [LeetCode-面试算法经典-Java实现][全部题目文件夹索引] 原题 Given a 2D board and a word, find if ...
- ArcEngine中IFeatureClass.Search(filter, Recycling)方法中Recycling参数的理解
转自 ArcEngine中IFeatureClass.Search(filter, Recycling)方法中Recycling参数的理解 ArcGIS Engine中总调用IFeatureCla ...
- 【转载】关于BooleanQuery在搜索中的用处
我们在搜索中可能会遇到要搜索索引文件中不同字段,不同字段之间就存在了与或非的运算关系,如:这个xx字段中必须存在什么什么关键词,而另一个 XXX字段可以存在或不存在什么什么关键词等等等.这就需要有Bo ...
- iphone H5 input type="search" 不显示搜索 解决办法
H5 input type="search" 不显示搜索 解决办法 H5 input type="search" 不显示搜索 解决方法 在IOS(ipad iP ...
随机推荐
- 转: CentOS安装jdk8
from: http://tecadmin.net/install-java-8-on-centos-rhel-and-fedora/ After a long wait, finally Java ...
- 转:MVC 数据验证
一.基础特性 一.Required 必填选项,当提交的表单缺少该值就引发验证错误. 二.StringLength 指定允许的长度 指定最大长度: [StringLength()] //最大长度不超过2 ...
- Git实用命令手册
下载代码 git clone <git地址> 用户配置 git config —-global user.name <name> git config —-global use ...
- linux常用工具链接
http://linuxtools-rst.readthedocs.io/zh_CN/latest/tool/lsof.html
- iOS获取当前AppStore版本号与更新
- (void)checkUpdateWithAppID:(NSString *)appID success:(void (^)(NSDictionary *resultDic , BOOL isNe ...
- spring session 和 spring security整合
背景: 我要做的系统前面放置zuul. 使用自己公司提供的单点登录服务.后面的业务应用也是spring boot支撑的rest服务. 目标: 使用spring security管理权限包括权限.用户请 ...
- 使用Charles检测HTTPS网站的数据包
1.下载Charles 下载地址:https://www.charlesproxy.com/download/ 2.安装Charles的证书 选择Help->SSL Proxying->I ...
- 只需三步--轻松反编译Android Apk文件
安卓程序是通过java语言进行编写的,可以很容易进行反编译.很多apk文件被反编译后再二次打包,就成了自己的产品,很是流氓.下面我们来看看如何进行apk的反编译,以及常用的防反编译手段. 一.反编译A ...
- JSON--JavaScript Object Notation
概念 一种轻量级的数据交换格式,本质是特定格式的字符串,是客户端和服务器端交互数据的常用选择 规则 []集合 [value1,value2] {}对象 {key1:value1,key2,value2 ...
- 最简单的基于JSP标准标签库的增删改查
创建数据库中的表:CREATE TABLE `websites` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` char(20) NOT NULL DE ...