custom logout page in service now

kirankumarboyin
Mega Contributor

Hi Team,

I am working on the one requirement as follows

clicking on the hyper link I have to navigate my own custom login page instead of default service now login page.

I observed that there OOB installation exit Logout   executing here below one is the code

gs.include("PrototypeServer");

var Logout = Class.create();

Logout.prototype = {

              process : function() {

              var s = request.getParameter('sysparm_goto_url');

              gs.info('-testing-sysparm_goto_url'+s);

              if (s && GlideSecurityUtils.isURLWhiteListed(s)){

                      gs.info('-testing-if-');

                  response.sendRedirect(s);

              }

              else{

                      gs.info('-testing-else-');

                  response.sendRedirect("logout_success.do");   // after executing

              }

                  return true;

              }

};

Could any body suggest the how can customize the above code by using the parameter sysparm_goto_url   so I can use my own custom login page.

Please suggest the best one.

Regards,

Kiran

2 REPLIES 2

sajan0192
Giga Expert

Hi Kiran,



Create UI Page having name "logout_success".
Add whatever you want in that page.



Regards,
Sajan


Thanks for the information.