简体   繁体   English

在NetSuite Web服务支持案例搜索中对结果进行排序?

[英]Sort results in NetSuite web service support case search?

Is it possible to set search preferences in the web service call to sort the data that is returned? 是否可以在Web服务调用中设置搜索首选项以对返回的数据进行排序?

I am using the SupportCaseSearch object to perform a web service search that returns back a customer's support cases to be displayed in our Customer portal. 我正在使用SupportCaseSearch对象执行Web服务搜索,该搜索将返回客户的支持案例以显示在我们的客户门户中。 I need to do this by paging the results and only bringing back a page at a time, because pulling back all of the support cases at once takes entirely too long. 为此,我需要分页结果,并且一次只能返回一页,因为一次撤回所有支持案例将花费太长时间。 By default, NetSuite returns the support case records in ascending order of internal id. 默认情况下,NetSuite以内部ID的升序返回支持案例记录。 So with paging, the first page contains the oldest support cases a customer has since these obviously have the lowest internal IDs. 因此,在分页中,第一页包含客户拥有的最旧的支持案例,因为这些案例显然具有最低的内部ID。 This is obviously unacceptable for our website since the customer is going to expect to see their most recent cases first. 对于我们的网站来说,这显然是不可接受的,因为客户期望首先看到他们的最新案例。

Is there a way to do the search where records will be returned in descending order of internal IDs or most recent lastModifiedDate first? 有没有一种方法可以搜索记录,这些记录将以内部ID的降序或最近的lastModifiedDate顺序返回?

Create a saved search of Support Cases with the sort order fields set on the Results tab - in your case, dateCreated DESC. 使用在“结果”选项卡上设置的排序顺序字段(在您的情况下为dateCreated DESC)创建支持案例的已保存搜索。

Use SupportCaseSearchAdvanced to execute the saved search, dynamically applying a filter for the customer field. 使用SupportCaseSearchAdvanced执行保存的搜索,为客户字段动态应用过滤器。

The results will come back sorted properly. 结果将返回正确排序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM