Home > Uncategorized > Enabling the Default Internet Explorer Context Menu

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.

function document.oncontextmenu()
 event.returnValue = true;

 var s = event.srcElement.tagName;
 (!event.srcElement.disabled &&
 (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.

Categories: Uncategorized Tags:
  1. John
    January 12, 2011 at 7:52 pm

    How would I go about doing this in CRM 2011?

  2. September 7, 2011 at 4:15 pm


    everbody which share my opinion that it would be helpful if MS have a supported method for this requirement could vote for that issue on:


  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: