Home > Uncategorized > Adding Custom Menu Links

Adding Custom Menu Links


Adding Menu link to MSCRM is as easy as adding nodes to xml file. This can be done by editing ISV.config file located at path <wwwroot>/_Resources/.

MSCRM provides CustomMenu tag that can be introduced at:  

1.      The MenuBar element inside the Grid element can contain an ActionMenu element and one or more Button elements.
2.      The MenuBar element inside the Root element can contain a CustomMenus element.
3.      The MenuBar element inside the Entity element can contain a CustomMenus element.

Note: Adding menu Items to existing menu like “New” is not possible through ISV.config file as it clearly separates CustomMenu and default menu and not supported in MSCRM 3.0.

Adding Menu Links to Application Menu Bar

pic-2.JPG

pic-1.JPG

Adding Menu Links to Entities:

<Entities>
 <Entity name="account">
  <MenuBar>
   <CustomMenus>
    <Menu Title="Custom Menu">
     <MenuItem Title="Custom Application Window" 
Url=http://www.microsoft.com/customwindow.aspx 
ValidForUpdate="1" ValidForCreate="0" AvailableOffline="false" /> />
     </Menu>
    </CustomMenus>
   </MenuBar>
 </Entity>
</Entities>
 
Adding Action Menu Links to Grid:     


<Grid>
    <MenuBar>
     <ActionsMenu>
      <MenuItem Title="Coming Soon..." 
Url="http://www.microsoft.com" WinMode="1" />
      <MenuSpacer />
     </ActionsMenu>
     <Buttons>
      <Button Title="Test" ToolTip="Info on Test" 
Icon="/_imgs/ico_18_debug.gif"
Url="http://www.microsoft.com" WinParams="" WinMode="2" />
      <ToolBarSpacer />
    </MenuBar>
   </Grid>


Attribute

Availability Description
AvailableOffline Entity and grid only Defines whether the link should appear in the Outlook client if the client is offline. Valid options are True and False.
Client All Defines which client applications the link should appear in. Valid options are Web and Outlook. If you leave this blank or ignore the node, the menu item will display in both client applications.
JavaScript All If populated, Microsoft CRM will execute the JavaScript. If populated, the Url attribute will be ignored.
PassParams Entity and grid only If set to 1, Microsoft CRM will pass the entityid and enititytypecode of the entity form to the new window. Valid options are 0 (don't pass parameters) and 1 (pass parameters).
Title All Displays the label that appears to the user.
Url All Microsoft CRM will open a window to the path specified in this attribute. If the JavaScript attribute is populated, the Url attribute will be ignored.
ValidForCreate Entity and grid only Displays menu item when the entity form is in create mode. Valid options are 0 (don't display) and 1 (display).
ValidForUpdate Entity and grid only Displays menu item when the entity form is in update mode. Valid options are 0 (don't display) and 1 (display).
WinMode All Determines the type of window to open. Valid options are:·         0 (normal window)·         1 (modal dialog box)·         2 (modeless dialog box)

 

About these ads
Categories: Uncategorized Tags: ,
  1. August 24, 2008 at 12:44 am

    Where exactly is the *.xml menu file for an instance of CRM in the Enterprise edition?

  2. Bob
    April 22, 2009 at 9:30 pm

    Is it possible to change existing menu text. Change “Close Opportunity” to “Complete Opportunity”?

  3. swami
    May 18, 2009 at 4:26 am

    Hi ayaz,

    when i tried this in a system entity like quote it works but whenI am trying the same in a custom entity it is not working and giving me an error “Could not complete the operation due to error 80020101″ is custom menu is not supported in custom entities or I am doing something wrong ?

  4. December 22, 2011 at 10:06 am

    Wow, fantastic weblog structure! How lengthy have you ever been running a blog for? you made running a blog look easy. The whole glance of your website is great, as smartly as the content material!

  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

Follow

Get every new post delivered to your Inbox.

Join 59 other followers

%d bloggers like this: