Useful Trick to debug your scripts in Dynamics CRM mobile client

No I am not going to put any MSDN link or try to explain how can you debug your scripts in tablet forms efficiently. After all we are in the world of interesting world of Dynamics 365 and writing something like that will be pretty banal.

However I am going to let you know one trick through which you can leverage the power of Developer tools of Chrome to debug your CRM scripts in tablets. And you might have been thinking that is something I have pulled out of my sleeve. Well, it’s not me but the brilliant Dynamics CRM Tip of the Day’ (http://crmtipoftheday.com/) guys where from I learnt this trick.

I was in one of the recent customer engagements and the customer was keen to bring in support for tablets and mobiles. They had some heavy customizations and they were getting left and right script errors when the forms were loading in tablets. Putting Xrm.Utility.alertDialog will only get you that far. And it was surprising that in-spite of they being pretty good on the platform, they were not aware of this trick suggested by ‘Dynamics CRM Tip of the Day’ guys. Below is a link to the same.

http://crmtipoftheday.com/2014/05/06/test-crm-for-tablets-from-a-pc-browser/

I  wonder why this is not suggested in many cases but this might really save you some serious time.

It’s a pretty old tip and hence I think people are not aware of it. Hence re-sharing. Believe me, after knowing this, if someone asks you to debug mobile scripts, you will find it easy like a piece of cake. And believe me, every tip I their blog is like gold dust.

I have been using it for pretty long time and yes it works for all versions. I have tried in Dynamics 365 and Dynamics 365 on-premises and it works like a charm. However do note that this works only in Chrome as far I have tested.

 

Sample Dynamics on-Premise with IFD url to access the mobile form in desktop browser.

https://<orgname>.<domainname>.com/nga/main.htm?org=<orgname>&server=https://<orgname>.<domainname>.com

Sample Dynamics 365 online url to access the mobile form in Desktop browser (North America Orgs)

https://<orgname>.crm.dynamics.com/nga/main.htm?org=<orgname>&server=https://<orgname>.crm.dynamics.com

 

You need to first launch chrome, put your Dynamics URL and then login. Once logged in successfully, take the mobile Url and paste in your browser. You should be good.

Debugging scripts is now just like the web client. All you need to do is put a debugger statement in script function you want and then just launch Chrome developer tools using F12. That’s all.

Below is the sample of screenshot of my Dynamics 365 on mobile client.

image

 

Hope this helps.

 

 

Try our tools

Sharepoint Metadata Manager and Attachment Extractor (http://www.xrmforyou.com/sharepoint-integrator-1.html)

Role Based Views in Dynamics CRM (http://www.xrmforyou.com/role-based-views.html)

Multiselect Picklist Control (http://www.xrmforyou.com/multi-select-picklist.html)

Record Cloner (http://www.xrmforyou.com/record-cloner.html)

Advertisements

About Debajit
I am a Dynamics CRM Most Valuable Professional (MVP) with 10 years of experience in Microsoft .NET Technologies and 7 years of dedicated experience in Microsoft Dynamics CRM. I have worked with companies like Microsoft, SanDisk, PwC, TMF Group and have extensive experience of implementing complex CRM solutions from both offshore and client side. Currently the face of XrmForYou.com with significant experience in delivering corporate training on Dynamics CRM and have already delivered multiple projects to client through XrmForYou.com Author of multiple tools on codeplex including the 'Role Based Views' and 'CRM-Sharepoint Metadata manager & Attachment Extractor' which are available for commercial use under XrmForYou.com For consulting/ training, drop me a note at info@xrmforyou.com or visit our website www.xrmforyou.com

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: