Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OnReadyStateComplete does not fire on IFrame

I have setup an IFrame on the Account Entity form in MS dynamics crm. When the OnReadyStateComplete event fires, I do some lookups and construct a custom URL, that calls my server and returns content to be displayed in the iframe. I used "about:blank" as the URL parameter in the setup: pic1

Then, on the events tab, I registered the js library and the event listener - handleIFrame: 2

Here is the content of the event handler (I removed all unnecessary code to try to get to the bottom of this).

function handleIFrame() {
    alert('handleIFrame');
}

This process is working for full version of CRM - Microsoft Dynamics® CRM Online 2015 Update (7.0.1.247) (DB 7.0.1.237) - it displays the content in the iframe as expected.

However, in Microsoft Dynamics® CRM Online 2015 Update (7.1.1.3113) (DB 7.1.1.3113) it seems that the OnReadyStateComplete event does not fire at all - my alerts in the event handler do not show. Am I correct in assuming this is a difference in versions? Has anyone experienced anything similar? I'm new to CRM, so any advice would be appreciated.

like image 963
emanncsu Avatar asked Mar 09 '26 11:03

emanncsu


1 Answers

After talking with Microsoft Dynamics CRM support, this is a bug in the 7.1 update. There is a work-around, however. In CRM, navigate to Settings > Administration > System Settings. Then, scroll to the bottom of the popup window - here you will see:

Use legacy form rendering - For compatibility, use the legacy form rendering engine. Note that performance may be adversely affected

Set this to "Yes" and the OnReadyStateComplete will begin to fire.

like image 158
emanncsu Avatar answered Mar 12 '26 02:03

emanncsu