Customizing Login and Logout Behavior

Written by
Denise Cuarto
Published on
October 1, 2024 at 3:15:38 AM PDT October 1, 2024 at 3:15:38 AM PDTst, October 1, 2024 at 3:15:38 AM PDT

Customizing the user experience during login and logout in NetSuite is possible with various options.

Using a Redirect Parameter:
After a user logs in, you have the flexibility to redirect them to a specific landing page within the NetSuite UI, such as a Customer record or a Support Case record. To achieve this:

1. Incorporate a redirect hidden field into the login form on your hosted HTML page, for instance:

<input type="hidden" name="redirect" value="/app/center/card.nl?success=true" >

2. Follow the steps detailed in the procedure within the "Creating a Custom Login Page" section.

Using a Role Parameter:
To provide users with a preferred role upon logging into the NetSuite UI, specify the role ID using the value parameter. To set a preferred role:

1. Integrate a role redirect hidden field into the login form on your hosted HTML page, for instance:

<input type="hidden" name="role" value="3" >

2. Follow the steps outlined in the procedure in the "Creating a Custom Login Page" section.

Displaying an Error Message:
In the event of an incorrect password or email during a login attempt, you can display an error on your hosted login page. This approach allows you to maintain consistent company branding on the login page instead of redirecting to a generic NetSuite error page. To display an error message:

1. Introduce an error redirect hidden field into the login form on your hosted HTML page, for example:

<input type="hidden" name="errorredirect" value="/core/media/media.nl?id=572&c=TSTDRV1154923&h=b0c2553e7af5afb07ef2&success=false" >

2. Create an alternate version of your HTML login page that incorporates the error message or implement conditional logic in your custom HTML login page.
3. Follow the procedure detailed in the "Creating a Custom Login Page" section.

Customizing Logout Behavior:
Aligning your company website's aesthetics with the NetSuite application during user logout is achievable by specifying a landing page:

1. Navigate to Setup > Company > General Preferences.
2. Access the Centers subtab and choose the appropriate center.
3. Input the desired URL into the Log Out Landing Page field.