SuiteScript 2.0将过滤器添加到脚本中保存的搜索中

编程入门 行业动态 更新时间:2024-10-28 08:26:00
本文介绍了SuiteScript 2.0将过滤器添加到脚本中保存的搜索中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个自定义记录,其中有一个用于项目的字段和一个用于位置的字段.我对该记录进行了保存的搜索,该搜索已经具有我想要的列和始终需要的一些开始条件.我要在销售订单上时使用此搜索.我想在行上存储所有项目内部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将过滤器添加到脚本中保存的搜索中

本文发布于:2023-11-09 17:23:56,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1572980.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:过滤器   脚本   SuiteScript

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!