- The following methods do not work on CRM for tablets:
Xrm.Page.ui ViewPort Methods
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
- 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”)
// 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.
After identifying which ribbon buttons/commands do not work on CRM for tablets, a display rule should be configured using CommandClientTypeRule:
- 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:
- MoCA Client Dashboard Enhancements in Dynamics CRM 2015
- MoCA Client Enhancements for Offline Drafts in Dynamics CRM 2015