Popup Blocker Error

Apr 11, 2013 at 10:00 AM
Hello Everyone,

We are facing issues with the Popup blocker error and have referred Matt B's solution to it (http://blogs.msdn.com/b/mbarbour/archive/2012/01/31/how-to-override-the-crm-2011-popup-alert-in-cca-when-redirecting-a-popup-update.aspx). We have Rollup 12 installed on our server and this solution doesn't seem to help us, as after applying the same we are still having this popup occuring everytime.
We tried a modified approach to what is mentioned by Matt by attaching event handler to Browser.DocumentCompleted event rather than Browser.DocumentComplete as mentioned in the blog. By doing so we were able to restrict the popup by occuring only once but this also is not a clean solution and this issue for us is a show stopper.

Any help is much appreciated , thanks in advance !

Apr 11, 2013 at 1:50 PM
Hello Mukul,

I haven't worked with that specifically, however reading the blog post Matt clearly states that the method name in the javascript can be changed with new versions of CRM so my advice is to take a look of the involved javascript and compare it with the one used with previous rollups. Maybe the change goes beyond the method name but by undestanding the javacript that produces the popup you can determine what needs to be changed following Matt's bolg post.
Apr 11, 2013 at 3:44 PM
Hello Mukul,

we had the the same problem with our Adapter handling the popup. First of all the javascript function name is still the same .. so no need for change there.

We ended up in deriving our Adapter from WebAdapter and overwrite the javascript method every time, the OnNewWindow method is called.
 public class WebAdapter : WebApplicationAdapter,  IDesktopUserActionsConsumer
        public override bool OnNewWindow(string newUrlString, string fromUrlString, long flags)
            ((HTMLDocumentClass)this.Browser.Document).parentWindow.execScript("handlePopupBlockerError=function(){}", "JavaScript");
            //Some nice stuff here .. return false to block the popup

            return base.OnNewWindow(newUrlString, fromUrlString,flags);
This adapter has to be bound instead of the HAT Automation Adapter and not via the Automation XML. Its not a DDA so you loose HAT Automation Support for HostedApplications using this adapter..



Apr 21, 2013 at 7:09 PM
Hi Mukul,

We had the similar problem after RU12 update. And couldn't able to resolve the issue in a decent way. But, the alternate we observed is Use the JavaScript method (handlePopupBlocker) in FrameNavigationCompleted event of web adapter. In that way we are able to resolve the issue.

However, we end up with a major issue (related to Ribbons - Non of the Session based application's Ribbon are functioning, basically they all are locked - Refer my another query in this forums) and turned back to RU11, which is more stable and working fine.

Thank you