Modules
Objects/Functions
SuiteScript 2.0
N/auth Module
Member Type:
Name
Search NetSuite -
https://system.netsuite.com/app/help/helpcenter.nl?search=N/auth Module
// Code Example 1
/**
* @NApiVersion 2.x
*/
// This script changes the currently logged-in user's NetSuite email address and password.
require(['N/auth'],function(auth) {
function changeEmailAndPassword() {
var password = 'myCurrentPassword';
auth.changeEmail({
password: password,
newEmail: 'auth_test@newemail.com'
});
auth.changePassword({
currentPassword: password,
newPassword: 'myNewPa55Word'
});
}
changeEmailAndPassword();
});
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4296360422.html