This is an update to a prior blog post here
How to stop the CRM Popup alert when you grab a window and re-host it to another tab, while suppressing the OnNewWindow event is a common issue that developers working with CCA have..
If you tried to suppress a CRM popup and redirect it… you’ve probably seen this message a few times:
So how do you get rid of it?
The 2 approaches I’m going to describe here work for CRM 3 and 4.0 and CRM 2011.
In short; Please do not do this.
If you do choose to ignore this warning and go there, be aware that patches and updates to the CRM 2011 platform will most likely overwrite the file you changed and you will find that you need to make a manual update every time.
The way the CCA MCS team does this allows CRM to continue without server side changes and works for CRM UI elements hosted inside UII via a WebApplication adapter.
So how do we do it?
This is updated from the prior post and I’m updating his new approach here with his permission.
Setting up the event hooks:
In your web application adapter you need to override the Initialize method and add in a new event hook for Document complete, this event hook is a lower level event hook then what you would get with the Adapters version of Document complete and should only be used for this purpose.
This will set up our event direct connection to the IE Instance’s Document completed event, at a lower level then what CCA works with normally.
Updating the function on the fly.
Next we need to build out the event handler we created, which will be called when any part of the document raises a document complete event and overwrite the in memory version of the CRM handle popup blocker error function.
That event will look like this:
The net result is that you will not get the popup blocker alert from CRM.
Few cautionary notes: ( disclaimers )
Changing the behavior of CRM is an unsupported modification.. so if you encounter errors in CRM, make sure disable this event and validate that the error is still there prior to calling support on it.
Future updates may change the name of the method that we update here. While that is unlikely, this is an unsupported on the fly modification. The CRM team makes no guarantee the method name will not change.
This has been used and works successfully on CRM 3, 4 and 2011.