Its quite often that you would want your code to only execute in a certain type of MS CRM Client. e.g. Outlook Laptop client, Outlook Workstation client.

Microsoft Dynamics CRM supports these clients:

– Microsoft Dynamics CRM Web application
– Microsoft Dynamics CRM for Outlook
– Microsoft Dynamics CRM for Outlook with Offline Access

You can check which client your form is being viewed in using JavaScript and the MS CRM Global Functions.

Function name Description
IsOnline Returns true if the form is online.
IsOutlookClient Returns true if the form is on either of the Outlook clients.
IsOutlookLaptopClient Returns true if the form is on the Outlook laptop client.
IsOutlookWorkstationClient Returns true if the form is on the Outlook desktop client.

An example of how you would use the functions is shown below.


if (IsOnline())
{
        alert("Form IsOnline!");
}
Advertisements