Staying away from “window.showmodaldialog” in your CRM code

The window.showmodaldialog web API interface from Microsoft has been a subject for discussion for a long time. There are plenty of articles out there arguing why it’s a bad design for the web. This isn’t where I’m trying to go with this article.

The idea behind that method is to create a modal dialog that displays a specified HTML document. This was very useful before the emergence of jQuery and the abundance of jQuery UI libraries that present better alternatives to the showmodaldialog method. In the context of a web based application like Dynamics CRM, the use of jQuery and jQuery UI to create modal dialog windows is trickier. In short, using those libraries to create modal dialogs would be unsupported because in the background, they would be making change to the DOM which is not supported. That is why a lot of CRM applications I have seen use the showmodaldialog method.

Chrome and Firefox have officially deprecated the function and it now falls into the “use at your own risk” category. I wanted to suggest a few alternatives as you upgrade your CRM JavaScript code in the near future.

  • Use the regular window.open method. The hardest part of the job will be to convince your customer that having the possibility to make changes to the parent page is not a big deal (seriously!)
  • If you need to perform an action after the window.open returns, use the new HTML5 “postMessage” API.
    • How it works? Before opening your web resource (window.open or Xrm.Utility.openwebresource), register a method/handler to perform what needs to be done when the web resource closes (that’s an example, it could be on another event in the web resource). In the web resource, when the time has come to trigger the action on the opener page, simply use the window.postMessage function to send a message to the parent page. The message will be picked up by the handler and perform the necessary operation(s).
    • Be careful using this because you might get issues if your browsers does not support this functionality
  • I have not tried this, but fellow MVP Andrii Butenko has found the method that Microsoft uses to display modal windows. You can find his blog post on the subject here. Keep in mind that this method is unsupported.

The bottom line is that the showmodaldialog method was useful in the CRM context and its deprecation from the most popular browser(s) forces us to make adjustments.

Hope this helps!

CRM 2013 Deployment Certification Tips

I just passed Microsoft Dynamics CRM 2013 Deployment certification exam today with fairly little preparation (i.e. no course, no question studies, and no book). In my defense, I had a second shot voucher so I was thinking I could go back in a week if I didn’t pass it :).

I thought I would share the “study material” that I used to prepare for it.

YouTube Videos

Other Resource

That’s all I used, plus obviously a few years of experience with the product.

Recommendation

Spend some time on

  • CRM Outlook Client material (upgrade path from 2011, Online/Offline mode, having multiple organizations on the same outlook client etc.)
  • Email functionalities (router installation, configuration, server side synchronization, smart matching/tracking token).

Good luck!

CRM 2013 Quick View Menu

I am used to the new navigation now, but I don’t think it’s the best user experience. This is the first official alternative that I know of. Apparently, I am not the only one thinking about alternate navigation!

MSCRM Bing'd

The Quick View Menu helps you navigate to any location in Dynamics CRM quickly and seamlessly by taking your existing Sitemap and presenting it in an easy to navigate interface. The menu currently comes with a Win 8 UI look & feel while also allowing you to provide additional resource and configuration settings.

Available from CodePlex http://crm2013quickviewmenu.codeplex.com/

Open Quick View from Sitemap

QuickViewMenuBar

Example of CRM Sales

QuickViewMenuOOB

Example of full OOB menu layout and style

QuickViewMenuFullView

The managed solution configuration page provides a Sitemap setting to easily add/remove the Quick View Menu to/from you Sitemap.

QuickViewConfig

Quick View Menu Summary

Current Features

  • Multi-browser support Currently tested with IE 10+, Chrome, FireFox
  • Configure Sitemap Area, Group and SubArea exclusions. (i.e. modify QuickViewMenuConfig.xml)
  • Resource management such as Sitemap item Title, Icon overrides. (i.e. modify QuickViewMenuResources.xml)
  • Win 8 UI look & feel.
  • Add/Remove Quick View Menu to/from the Sitemap easily from the Solution Configuration.
  • Horizontal Mouse…

View original post 121 more words

CRM 2013 is almost here!

We’ve been hearing a lot about the Dynamics CRM 2013 release, but only MSFT partners like us have seen the beta and RC versions running live over the past few months. Because it was all part of the beta program, we haven’t shared much details on CRM 2013 to our clients and in the communities but finally now, we have official word and details from Microsoft!

You can check out the official release information from Microsoft: http://rc.crm.dynamics.com/rc/2011/en-us/Dynamics-CRM-Upcoming-Release-Information.aspx

When it’s officially out, I’ll publish a couple of posts with some on the key takeaways from my perspective.

Cheers!