redirect.toSearch(options)

Note:

The content in this help topic pertains to SuiteScript 2.0.

Method Description

Redirects a user to an on demand search built in SuiteScript.

This method loads a search into the session, and then redirects to a URL that loads the search definition page.

Returns

void

Supported Script Types

afterSubmit user event scripts

For more information, see SuiteScript 2.x User Event Script Type.

Governance

None

Module

N/redirect Module

Since

2015.2

Parameters
Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

options.search

search.Search

required

The search to be redirected to.

Syntax
Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/redirect Module Script Sample.

          var column = ['internalid'];
var filter = [["mainline", "is", "T"]];
var ourNewSearch = search.create({
    id: 'customsearch_test',
    type: search.Type.SALES_ORDER,
    title: 'My Generated Search',
    columns: column,
    filters: filter
});
redirect.toSearch({
    search: ourNewSearch
}); 

        

Related Topics

N/redirect Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices