Pages

Wednesday, July 4, 2012

Simplifying Navigation: Home Icon

After having given a lengthy introduction on my philosophy as it relates to UI Navigation, I thought I'd open with perhaps the oddest scenario that deals with this subject.

As is well known, there have been some concerns being voiced about having too many popup windows when navigating CRM. In contrast, I have dealt with CRM applications that keep everything in a single web form. And there are pros and cons for both design approaches which I'm not going to delve into now. I'll just summarize and say that Internet Explorer browser technology has signficantly reduced the downside of CRM's pop-up windows approach. Namely the "Always open pop-ups in a new tab" of the "Tabbed Browser Settings" that keeps everything in a single IE session as illustrated below:



However as more and more tabs get opened things can start getting a little crowded and it can start to look like this:



And in one particular case, the client was getting lost in terms of navigation specifically in regards to being able to find the main CRM navigation window. They requested a kind of "home" feature which would close the main window and return them immediately to the main navigation instead.

After a bit of research I was able to accomplish this goal with a relatively simple solution:


  • I added a "Home" icon to the forms (this can be done per form or globally via the global ribbon settings)
  • When clicking this icon it performed the following 2 actions:
    • Reload the main CRM navigation
    • Close the current form

This action was carried out using a simple jscript function i.e.:

function NavHome() {
 window.open(Xrm.Page.context.getServerUrl(), "homecrm");
 Xrm.Page.ui.close();
}


This solution is definitely not for everyone and contains two inherent limitations:

  1. After clicking "Home" for the first time, another main navigation will be opened. Upon subsequent clicks the main navigation opened previously will be re-used. This means that there will be 2 main navigation windows - the main navigation window loaded when CRM was first opened and the navigation window opened as a result of clicking "Home". The main navigation form is able to be re-used via the "Home" icon as we are giving a handle to the form being opened via the jscript (homecrm) and every time it is called, it will re-use the window with that handle. The issue is that I could not determine what handle Microsoft provides the main navigation when opened the "standard" way. I am sure there are some clever tricks around this issue such as modifying the URL for opening CRM - I haven't looked into that.
  2. Whenever the main navigation is reloaded using the "Home" icon the navigation is reset. So for example, if whenever CRM loads it by defaults loads the contacts view and you have navigated to another CRM view in that form - when you click the "Home" icon again, the main navigation will return back to its default i.e. the contacts view in this example.

Other than the above which do not necessarily take away from what we're trying to accomplish in any meaningful way, it works pretty well. That said, I do expect continued improvement from Microsoft in terms of UI Navigation (as we saw significantly with the introduction of CRM 2011) so at some point this whole solution may no longer be relevant.

No comments:

Post a Comment