Looking for PowerObjects? Don’t worry, you’re in the right place! We’ve been part of HCL for several years, and we’ve now taken the final step in our acquisition journey: moving our website to the HCL domain. Nothing else is changing – we are still fanatically focused on Microsoft Business Applications!

PowerObjects Blog 

for Microsoft Business Applications

|

CRM 2011 Form Load Performance Tip – Collapsing Tabs

Post Author: Joe D365 |

One of the things we ran into with our recent upgrade projects (Microsoft Dynamics CRM 4.0 to CRM 2011) is that there are a lot of tabs with IFRAMEs to custom pages on the contact form. The CRM 2011 form load performance was very slow after the upgrade where we are loading all the IFRAMEs on load of the form by default. Then we tried adding code to load these IFRAMEs on the "TabStateChange" event of the corresponding tabs. To accomplish this, we followed the following steps:

1. The tabs should be collapsed by default.

CRM 2011 Form Load Performance

2. And also, the URL for the IFRAME in the form customization should be set to "about:blank" so that nothing loads by default. When the user clicks on the tab link in the Left navigation on the form, the tab will be automatically expand in the CRM UI

CRM Form Load

3. Here is the code snippet we added to the TabStateChange Event function call.

function tab_custom_onstatechange() {

if (Xrm.Page.ui.tabs.get("tabname").getDisplayState() == "expanded") {

var IFrame = Xrm.Page.ui.controls.get("IFRAME_Name");

IFrame.setSrc('Custom URL for the destination page');

}

}

4. Added this code to a JavaScript library and attached it to the "OnTabStateChange" event:

5. We repeated this for all the tabs with IFRAMEs which are custom and where delaying the load of the form and the ones which are not on the main tab of the form

On doing this, the performance change was drastic since the client had lots of tabs which contained more than one IFRAME. Way to go JoeCRM!

As always, we hope this tip helps you as you journey through the wonderful world of Microsoft Dynamics CRM. Feel free to contact the CRM Experts at Powerobjects if you need help with any projects related to Dynamics CRM.

Happy CRM'ing

Joe CRM
By Joe D365
Joe D365 is a Microsoft Dynamics 365 superhero who runs on pure Dynamics adrenaline. As the face of PowerObjects, Joe D365’s mission is to reveal innovative ways to use Dynamics 365 and bring the application to more businesses and organizations around the world.

One comment on “CRM 2011 Form Load Performance Tip – Collapsing Tabs”

  1. hi, i got thru your post. will you please let me know from your observation that, if the tab is collapsed in 2011, does it load the IFRAME(sub-grid)?
    or once we clicked in the tab then it expands and loads the IFRAME(sub-grid).

    thanks,
    Sudhanshu

PowerObjects Recommends