Modules

filter

 

Objects/Functions

module (N/http)

SuiteScript 2.0

ServerResponse.sendRedirect(options)

{ServerResponse}.sendRedirect({identifier: {number | string*},type: {http.RedirectType*},editMode: {boolean},id: {number | string},parameters: {Object}})

N/http Module
ServerResponse.sendRedirect()
Method Description: Sets the redirect URL by resolving to a NetSuite resource. For example, you could use this method to redirect to a new sales order page for a particular entity.
Returns: void
Supported Script Types: Server scripts For more information, see SuiteScript 2.0 Script Types.
Governance: None
Module: N/http Module
Parent Object: http.ServerResponse
Sibling Object Members: ServerResponse Object Members
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=ServerResponse.sendRedirect(options)

Example:

// Code Example 1
// Add additional code
//...
myServerResponseObj.sendRedirect({
type: http.RedirectType.RECORD,
identifier: record.Type.SALES_ORDER,
parameters: {entity: 8}
});
//...
// Add additional code

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4315616450.html