Sometimes we need to make client side scripting is CRM intelligent enough to identify which device is running
and then only run some script and not others.
This method was introduced with Microsoft Dynamics CRM Online 2015 Update 1
context.client.getFormFactor()
The values work as below:
Value Form factor
0 Unknown
1 Desktop
2 Tablet
3 Phone
For eg, if there is a code particular to Desktop:
function fun()
{
var formFactor = Xrm.Page.context.client.getFormFactor();
if (formFactor == 1)
{
//Code specific to run on desktop
}
}
Hope it helps and Happy CRMing!