How to get client browser type in MSCRM?

Spread the Knowledge...

Browsers - How to get client browser type in MSCRM?

There might be a requirement where you need to find out the type of your browser and according to execute some code snippet.
The getClient() method can be used to get the type of the browser. It returns a value to indicate which client the script is executing in.

//Sample Code
function getClientName()
var clientName = Xrm.Page.context.client.getClient();

This example returns the value as:

  1. Web in case of Web Browser
  2. Outlook in case of Outlook Client
  3. Mobile in case of Mobile Browser

Note: Use getClient() method instead of the removed isOutlookClient() method.

Happy CRMing!!!

Spread the Knowledge...