Please wait, loading...

 

Method Xrm.Page.ui.formSelector does not work in tablet and mobile device. Use getClient() in Dynamics 365 , MS CRM

October 11, 2017
Below are some of the examples that will not work in tablets when using MSCRM

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

When these method are executed in Tablet or mobile device then these will return nothing and defining will return undefined.

So  if we are customization it for tablet we should distinguish the client device in JS and write code .
var isCrmForTablets = (Xrm.Page.context.client.getClient() == “Mobile”)
if (isCrmForTablets)
{
// Code for CRM for tablets only goes here,
}
else
{
// Code for web browser or CRM for Outlook only goes here.
}
// Code for any client goes here.
 
To make sure which commands will work in tablet then include a command rule for more info refer Here.

Hope it will help. thanks

SOURCE : mscrm.com

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/04/Microsoftdynamics365.png?fit=640%2C651&ssl=1
Microsoft Dynamics Community Profile

Learn more