POWEROBJECTS

718 Washington Ave. N. Suite #101
Minneapolis, MN 55401
View map and all Locations

Send us a message

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:

crm2011

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

Avatar for JoeCRM

JoeCRM

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