In this webinar, our experts showcase a variety of demo use cases of how different components of the...
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.
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
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
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