How to Debug Javascript webresouces in Dynamics 365 for phones

Follow Debajit’s Power Apps & Dynamics 365 Blog on WordPress.com

First of all Happy New Year to all my blog readers. It’s been sometime I have been writing something and I love the fact that I am back at quite early stage of the year.

New year, new assignment and on the very first week I am working on mobile enablement for a client. Now mobile can be Tablets/ Phone interface and here the customer was more interested towards using Dynamics 365 for Phones.

The client already had some pretty hefty scripts written on the forms and if you have already worked on enabling CRM for mobile you know the pain of debugging scripts.

Thankfully there is a trick of showing up mobile preview in browser

So if my Organization url is https://xrmforyou40.crm.dynamics.com and my org unique name is – orgffgh56 (you can find it out by going to Settings –> Customizations –> Developer Resources), the following url will show up the mobile mockup in the web browser.

https://xrmforyou40.crm.dynamics.com/nga/main.htm?org=orgffgh56&server=https://xrmforyou40.crm.dynamics.com

You might be thinking – What’s new in this? It’s been told so many times already in so many wonderful blogs.

Well yes! But there is a subtle difference to it.

The above URL will simulate how your Dynamics 365 will look in Tablets. Dynamics 365 for Phones can be tricky considering the functionalities are more limited than tablet and also the UI rendering is different from the way it renders in the tablets.

Now a small twist in the URL

https://xrmforyou40.crm.dynamics.com/nga/main.htm?org=orgffgh56&server=https://xrmforyou40.crm.dynamics.com&phone=true

Just adding the Phone query string at the end will do wonders and it will render just like the way it will show up in your phone.

Hope this helps!

(For consulting/ training contact us at info@xrmforyou.com)