Modules

filter

 

Objects/Functions

module (N/ui/serverWidget)

SuiteScript 2.0

Assistant.sendRedirect(options)

{Assistant}.sendRedirect({response: {response*}})

N/ui/serverWidget Module
Assistant.sendRedirect()
Method Description: Manages redirects in an assistant. This method also addresses the case in which one assistant redirects to another assistant. In this scenario, the second assistant must return to the first assistant if the user Cancels or Finishes. This method, when used in the second assistant, ensures that users are redirected back to the first assistant.
Returns: void
Supported Script Types: SuiteScript 2.0 Suitelet Script Type and SuiteScript 2.0 User Event Script Type (beforeLoad(scriptContext))
Governance: None
Module: N/ui/serverWidget Module
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=Assistant.sendRedirect(options)

Example:

// Code Example 1
//Add additional code
//...
var assistant = serverWidget.createAssistant({
title: 'Small Business Setup Assistant',
hideNavBar: true
});
if (request.method === 'POST') {
if (assistant.getLastAction() === 'finish') {
assistant.finishedHtml = 'Completed!';
assistant.sendRedirect({
response: response
});
}
}
//...
//Add additional code

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