Preventing Mobile Devices from Accessing the Saleslogix Web Client

We recently had a customer request that their users not be able to access the Saleslogix web client from their mobile devices.  Implementing this turned out to be relatively easy.  Here is what I did.

In the Login.aspx page there is a javascript block at the top of the page that adds code on the document ready client event.

After the if(Sage.gears) code block you can add the following code:

    var mobile = (/iphone|ipad|ipod|android|blackberry|mini|windowssce|palm/i.test(navigator.userAgent.toLowerCase()));
              if (mobile) {
                  document.location = “NoMobile.html”;                
              }

This detects the device accessing the page via the navigator class.  Based on common device names it will redirect the user to a page called NoMobile.html if it finds the browser is running on one of these devices.

 

ABOUT THE AUTHOR

Kris Halsrud

Kris Halsrud is a Senior Analyst / Developer for Customer FX Corporation.

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe To Our Newsletter

Join our mailing list to receive the latest Infor CRM (Saleslogix) and Creatio (bpm'online) news and product updates!

You have Successfully Subscribed!