redirect.toSearchResult(options)

Method Description

Redirects a user to a search results page. For example, the results from an on demand search created with the N/search Module, or a loaded search that you modified but did not save.

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 result 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.

          //Add additional code 
...
   myNewSearch = search.create({
       type: search.Type.CUSTOMER
   });
   redirect.toSearchResult({
       search:myNewSearch
   });
...
//Add additional code 

        

Related Topics

General Notices