我有一个自定义记录,其中有一个用于项目的字段和一个用于位置的字段.我对该记录进行了保存的搜索,该搜索已经具有我想要的列和始终需要的一些开始条件.我要在销售订单上时使用此搜索.我想在行上存储所有项目内部ID和位置ID的数组,然后将其作为动态过滤器传递给SuiteScript 2.0中的此搜索.
I have a custom record that has a field for an item and a field for location. I have a saved search on that record that already has the columns I want and some beginning criteria that will always be needed. I want to use this search when I am on a Sales Order. I want to store an array of all the item internal ids and location ids on the lines and then pass that as a dynamic filter to this search in SuiteScript 2.0.
根据文档可以完成此操作.在search.Filter页面上说:您使用search.createFilter(options)创建一个搜索过滤器对象,并将其添加到您使用search.create(options)创建的search.Search对象中,或使用search.load(options)加载."但是,我在search.load上看不到任何参数,也没有在加载后添加它的代码示例.使用search.Filter的所有示例都在search.create函数中使用它
According to the documentation this can be done. On the search.Filter page it says "You create a search filter object with search.createFilter(options) and add it to a search.Search object that you create with search.create(options) or load with search.load(options)." However, I do not see any parameter on search.load for this nor a code example of adding it after the load. All examples of using search.Filter are in using it in the search.create function
感谢您提供的任何帮助.
Thank you for any help you can give.
推荐答案您可以将过滤器对象推送到搜索的过滤器属性.
You can push the filter object to the filters property of the search.
searchObj.filters.push(filterObj);更多推荐
SuiteScript 2.0将过滤器添加到脚本中保存的搜索中
发布评论