Creating Master Detail views in Dynamics CRM

One of the most typical “somewhat” unsupported customisations on Dynamics CRM is using IFrames to show associated views. This technique enables a nicer user interface showing more information about related records on the main entity form without having to click through the left hand side navigation panel.

I was doing some customisations the other day for a xRM demo we had with a customer, and I thought that it would be nice to have a two IFrames containing associated views but in a different way. Think on the typical Invoice and detail lines situation, wouldn’t it be nice to have all that information directly available in the customer form without having to navigate around to find it?

As usual, with some bits of JavaScript and imagination everything is possible on the Dynamics CRM UI, so let’s think on the basics behind this (full code at the end). First thing that we need is the ability to load on an IFrame the desired associated view for invoices instead of having it on the left hand side navigation panel. This is quite easy and there are plenty of blogs about around the internet, we basically need to find out the page that renders the view for that associated view. You could use the Internet Explorer Developer Toolbar (which is now integrated on

5 thoughts on “Creating Master Detail views in Dynamics CRM

  1. Marco,

    I’ve got it working now, but I had to do some fiddling to stop giving an error message.

    What I did was replace “document.frames(IframeMaster).frameElement” with crmForm.all.IFRAME_MyMasterIframe anywhere it appeared, and I did the same replacing “document.frames(IframeDetail).frameElement” with the hardcoded reference to my Detail Iframe.

    Referencing those variables like this: document.frames(IframeMaster).document.all

    ..seems to be fine.

    Any idea why this is?

    thanks,

    Nathan

Leave a Comment Yourself

Your email address will not be published. Required fields are marked *