Chris
01/31/2024, 3:27 PMSteve Goldberg
01/31/2024, 3:39 PMvar url = SC.ENVIRONMENT.baseUrl.replace('{{file}}','services/Account.Login.Service.ss');
var data = {
email: '<mailto:example@example.com|example@example.com>', // put the login email here
password: 'password', // put the password here
redirect: 'true'
};
jQuery.ajax({
url: url,
data: JSON.stringify(data),
type: 'post'
})
.done(function () {
window.location.reload()
})
Chris
01/31/2024, 3:41 PMSteve Goldberg
01/31/2024, 3:41 PMSteve Goldberg
01/31/2024, 3:41 PMSteve Goldberg
01/31/2024, 3:41 PMSteve Goldberg
01/31/2024, 3:41 PMSC
in your codeMarvin
02/13/2024, 3:24 AMjQuery.ajax({
url: Utils.getAbsoluteUrl(environmentComponent.getSiteSetting("touchpoints.logout"))
}).always(() => {
window.location = suitelet_url;
});
I can see that it calls the correct url but the return code is 303.Marvin
02/13/2024, 3:29 AMMarvin
02/13/2024, 3:39 AMJavascript is disabled on your browser.
To view this site, you must enable JavaScript or upgrade to a JavaScript-capable browser.
Steve Goldberg
02/13/2024, 11:19 AMwindow.location = SC.ENVIRONMENT.siteSettings.touchpoints.logout
If you’re trying to do it with SuiteScript, I’ve already documented (what I think) is the best way: https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_164383450200.html#Redirect-Users-with-SuiteScript