Modules

filter

 

Objects/Functions

module (N/redirect)

SuiteScript 2.0

redirect.toRecord(options)

{redirect}.toRecord({id: {string*},type: {string*},isEditMode: {boolean},parameters: {Object}})

N/redirect Module
redirect.toRecord()
Method Description: Method used to set the redirect URL to a specific NetSuite record. If you redirect a user to a record, the record must first exist in NetSuite. If you want to redirect a user to a new record, you must first create and submit the record before redirecting them. You must also ensure that any required fields for the new record are populated before submitting the record.
Returns: Void
Supported Script Types: Suitelets, beforeLoad user events, and synchronous afterSubmit user events For more information, see SuiteScript 2.0 Script Types.
Governance: None
Module: N/redirect Module
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=redirect.toRecord(options)

Example:

// Code Example 1
//Add additional code
//...
redirect.toRecord({
type : record.Type.TASK,
id : taskRecordId,
parameters: {'custparam_test':'helloWorld'}
});
//...
//Add additional code

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