script in ui script

Rosy14
Tera Guru

I have added below script under ui script of supplier portal theme. but not working. It should redirect user to sso page if not logged in.

(function() {
    if (gs.getSession().isLoggedIn() == false) {
        if (window.location.toString().indexOf('supplier?id=csm_ticket&table=sn_customerservice_case&sys_id=') > 0) {
            //var instance = gs.getProperty("instance_name");
            //gs.info("Rose: "+instance);
            url = "https://xyz.service-now.com/login_locate_sso.do";
            window.location.assign(url);
        }
    }
})();
0 REPLIES 0