How to disable Mobile UI and redirect user to ESC

xhensilahad
Tera Expert

 

Somehow, an end user got redirected to the mobile UI on this link:   yourinstanceurl/$m.do#/home.

I need to deactivate the mobile UI and redirect user to esc.

 

Steps I have taken are:

  • Updated sys property glide.ui.m_enabled   -Value : 'False'
  • Created sys_property glide.entry.first.page.script - Value : new SPEntryPage().getFirstPageURL();
  • Created sys_property glide.entry.page.script - Value : new SPEntryPage().getLoginURL();
  • Created sys_property glide.entry.loggedin.page_ess -  Value: /esc
  • Also sys_property glide.ui.m_agents - Value has been cleared

 

The mobile UI is still accessible and the user is not being redirected.

 

Thank you

2 REPLIES 2

Community Alums
Not applicable

Hi @xhensilahad ,

  • Created sys_property glide.entry.loggedin.page_ess -  Value: /esc , should be enough!!
  •  

Hi Sandeep, thank you for your answer.

 

When I login from my device, I am not redirected to Mobile UI, which is working as expected.

 

Second requirement:

But I want only the users that are logging from a Mobile or Tablet, to be redirected to /esc if they manually type  yourinstanceurl/$m.do#/home (which now they are still able to do).

 

I am trying to create a UI Page as below:

 

<script>
    // Check if the user is on a mobile or tablet device
    var isMobileOrTablet = /Android|iPhone|iPad|iPod|Windows Phone/i.test(navigator.userAgent);
    // Check if the URL contains "$m.do#" and the user is on a mobile or tablet
    if (window.location.href.includes("$m.do#") && isMobileOrTablet) {
        // Redirect to ESC
        window.location.href = "https://dev182855.service-now.com/esc";
    }
</script>
 
(there is an error in this script)
 
Thank you