web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

New Dynamics CRM for phones iOS App and getFormFactor method

Guido Preite Profile Picture Guido Preite 54,086 Moderator
Yesterday Microsoft released the new iOS App for Dynamics CRM (iTunes link). The app only works with CRM versions 7.1 and higher, this means currently can be used only with CRM Online instances that received the Update 1.

The new App supports JavaScript so I wanted to test a little script with the method getFormFactor.

getFormFactor (MSDN link) is a new method introduced with CRM Online 2015 Update 1 returning a numeric value based on the current device. The possible values are:

ValueForm Factor
0Unknown
1Desktop
2Tablet
3Phone

The script I wrote is:

function accountOnLoad() {
var factor = Xrm.Page.context.client.getFormFactor();
var message = "The Form Factor is: " + factor;
Xrm.Utility.alertDialog(message);
}
And the result is:

Note: the script is not called when a new record is created.

This was originally posted here.

Comments

*This post is locked for comments