Enabling the Default Internet Explorer Context Menu
Sometimes during development (debugging and troubleshooting) of MSCRM applications and customizations, you might want to use internet explorer features like view source and open in new windows. By default, MSCRM disables all internet explorer context menus. If you right click at any MSCRM form, no menu comes unlike other web applications.
In order to enable the context menus, you need to change the Global.js file.
1. On the Microsoft CRM Web server, navigate to <web installation path>\_common\scripts (typically C:\Inetpub\wwwroot\_common\scripts).
2. Open the Global.js file in Notepad.
3. Right-click the file, and then click Edit.
4. Use your text editor’s Find feature to locate the document.oncontextmenu() function.
5. Comment out the existing code in this function by adding /* and */ as shown in the following code. You can undo this change later by simply removing event.returnValue = true; line and the comment characters.
event.returnValue = true;
var s = event.srcElement.tagName;
(document.selection.createRange().text.length > 0 ||
s == “TEXTAREA” ||
s == “INPUT” && event.srcElement.type == “text”));
6. Save the file.
7. Open a page in Microsoft CRM and right-click it. You will see the familiar Internet Explorer context menu.
Caution: Backup your Global.js file so that you can restore your changes later on.
Caution: Use this technique at development and not at production environment as this unsupported change might cause unpredictable behavior. Microsoft CRM prevents use of the right-click context menu for the user’s benefit and also to maintain a predictable navigation structure in the application interface.