Spoiler alert! Unlike other blogs, I am not going to update you about any new feature. Rather I am going to share my project experience in handling multiple forms designed for your Web and Mobile layouts.
You have exposed you CRM recently to Mobile Apps. When you expose your CRM to Mobile Application development, in most of the scenarios you would end up designing separate forms. Let’s take the example of Account entity. Say you have designed two forms
- Account Web Form – This form is displayed to users while accessing CRM to Web
- Account Mobile Form – Form displayed to users while browsing CRM on Mobile
And you have your users who will just access CRM through desktop and then some users accessing CRM through both Desktop and mobile.
So now the implementation
First of all, as I have been across client locations, I find that some consultants still assume that to expose a form in mobile, we need to create a form of type = ‘Mobile Express’. Mobile express forms were required for previous Dynamics app – Dynamics CRM Phone express. For the current version of Mobile App for Dynamics, Form Type = Main would work just fine
So what is the next step? We create a new form of type Main, this time specifically for mobile and put in only the fields required for Mobile as per the requirement. But wait, we have another form already exposed for the desktop. So how do we handle this.
- Create a new security. Let us name it here – “Mobile User Security Role”. The privileges for this security role is optional and depends on your requirements.
- Assign the security to users who need to access CRM on mobile.
- In the Form order for Main Form set, set the Mobile form at the top of form order.
- The next step is to leverage the role based forms. Expose the Account – Mobile form to only users with Mobile User Security Role.
Uncheck the “enabled for fallback” checkbox as well.
Save an publish your customizations.
All set and done. Now this works very well for users who does not use desktop and manages through mobile (hardly the case) and users not exposed to mobile platform. However the issue is for a user who has access to mobile and desktop version. They now see two forms and the mobile form starts showing up in the desktop as well as it is highest level in the form order as well.
The last step here is to switch the mobile if it loads on desktop. The simple piece of client side script would just work fine when put in form load of the mobile form.
for (var i = 0; i < availableForms.length; i++)
Please remember that form navigation script is not supported on mobile. Hence first I am making the check if the client is Mobile.
Well there you go. Everything is up and running for you now.
Hope this helps!
Published at Mon, 18 Jun 2018 08:14:01 +0000