718 Washington Ave. N. Suite #101
Minneapolis, MN 55401
View map and all Locations

Send us a message

Microsoft Dynamics CRM for Tablets (aka MoCa) uses the same form definitions that are used in the web application. Any JavaScript code added to form event handlers or ribbon commands in the web application may also run within CRM for tablets application. However, due to presentation differences on the tablet form factor, there are some important limitations to be aware of:¬

  1. CRM for tablets doesn’t allow any functions that can block execution of scripts. Common JavaScript functions such as¬ window.alertwindow.confirm, and¬ window.prompt¬ should be replaced by using the¬ Xrm.UtilityalertDialog¬ and¬ confirmDialog functions. If you use¬ window.alert¬ in any form scripts, the message will automatically be displayed using¬ Xrm.Utility.alertDialog¬ without a callback function specified, but this is temporary and is considered deprecated. You must rewrite any code using window.alert¬ to use¬ Xrm.Utility.alertDialog¬ instead.

  2. A common JavaScript function that does not work on CRM for tablets is window.open. This function is used to navigate the app to a specified location such as an External URL or a specific CRM page. A workaround for this limitation is available only if the script needs to launch a CRM entity form (new or existing record). You must rewrite the script to use Xrm.UtilityOpenEntityForm.

  3. The following methods do not work on CRM for tablets:


Xrm.Page.context.¬ getCurrentTheme

Xrm.Page.ui¬ ViewPort Methods

Xrm.Page.data.entity.¬ getDataXml

Xrm.Page.ui control¬ Web resource and IFRAME control methods

Xrm.Page.ui. formSelector object methods

Xrm.Page.ui tab.¬ setDisplayState

Xrm.Page.ui. navigation.items collection

Xrm.Utility.¬ openWebResource

Xrm.Page.ui.¬ refreshRibbon



  • ¬†¬ Lookup¬ control methods such as addCustomView, getDefaultView and setDefaultView for setting/getting default views of lookups do not work on CRM for tablets due to UI differences.
  • ¬†jQuery does not work on CRM for tablets.
  • After identifying which scripts do not work on CRM for tablets, it is recommended to separate logic based on client type by using the getClient method:

var isCrmForTablets = (Xrm.Page.context.client.getClient() == “Mobile”)

if (isCrmForTablets)


// Code for CRM for tablets only goes here,




// Code for web browser or CRM for Outlook only goes here.


// Code for any client goes here.


  1. After identifying which ribbon buttons/commands do not work on CRM for tablets, a display rule should be configured using CommandClientTypeRule:


  2. Debugging form scripts and ribbon commands on CRM for tablets can be challenging. Here are some helpful tips:
    • Install CRM for tablets on a computer with Windows 8 /8.1 and Microsoft Visual Studio installed. Include¬ debugger¬†statements in the script in order to launch the debugger using Visual Studio.
    • Replacing “orgname” with the CRM organization name.
    • Use¬ Xrm.Utility.alertDialog¬†to display values from your code within CRM for tablets.
    • The web browser can be used to leverage standard script debugging capabilities for the HTML 5 portion of CRM for tablets.
    • Login with CRM credentials into the following URL: https://orgname.crm.dynamics.com/nga/main.htm?org=orgname&server=https://orgname.crm.dynamics.com

    For more tips on working with the MoCa, visit PowerObjects blog. There are some great new enhancements in CRM 2015, including:

Happy CRM’ing!

Avatar for JoeCRM


Joe CRM is a CRM superhero who runs on pure Microsoft Dynamics CRM adrenaline. As the face of PowerObjects, Joe CRM’s mission is to reveal innovative ways to use Dynamics CRM and bring the application to more businesses and organizations around the world.