redirect.toSearch(options)
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 |
User event scripts -afterSubmit entry point For more information, see SuiteScript 2.x Script Types. |
Governance |
None |
Module |
|
Since |
2015.2 |
Parameters
The options
parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
---|---|---|---|
|
required |
The search to be redirected to. |
Syntax
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
});