locked
How to add new menuitem under FILE menu in CRM 2011 ? RRS feed

  • Question

  • I have a requirement to add new menuitem under FILE menu in MSCRM 2011. I just want to know the code to add the new menuitem under File Menu
    Wednesday, January 29, 2014 8:47 AM

Answers

  • Hi,

    If you want just menu item in existing menu then menu id will be the existing menu id of that menu in which you want to add menu item.

    these are the existing menu ids-

    - Mscrm.Jewel.NewMenu.NewActivity
    - Mscrm.Jewel.NewMenu.NewRecord;

    • Edited by Akhileshrajpoot Thursday, January 30, 2014 4:35 AM
    • Marked as answer by MAKGO Thursday, January 30, 2014 7:41 AM
    Thursday, January 30, 2014 4:27 AM

All replies

  • To add New Button in File menu button.follow this steps

    1) Create New solution and add Application Ribbon in that Solution

    2) Export the solution and extract it

    3) open Customization.xml file in Visual Studio

    4)write following code in <RibbonDiffXml> tag

    add

     <Menu >

        </Menu >

    into

    <CustomActions />

    5) Save the file and convert it  as Zip file(i.e add customization.xml ,solution.xml,[content_types].xml)

    6) import that zip file into crm organization

    • Proposed as answer by Akhileshrajpoot Wednesday, January 29, 2014 11:03 AM
    Wednesday, January 29, 2014 10:04 AM
  • Hi Akhilesh,

    I will recommend you to use Ribbonworkbenfor all ribbon related customization.Working with XML to add buttons is not straightforward job.

    Hope it helps.


    If you find this post helpful then please "Vote as Helpful" and "Mark As Answer". Thanks and Regards, Mohammad Yusuf Ansari http://microxrm.blogspot.in

    Wednesday, January 29, 2014 10:17 AM
  • Hi,

    Its working fine. Use it.

    <

    RibbonDiffXml>

        <

    CustomActions>

         

            <

    CustomActionId="ymsli.Mscrm.Jewel.NewMenu.customactionid1.CustomAction"Location="Mscrm.Jewel.Controls1._children"Sequence="10">

          <

    CommandUIDefinition>

            <

    FlyoutAnchor  Command="Mscrm.Enabled"Id="Mscrm.Jewel.NewMenu.flyoutid1"Image16by16="/_imgs/ribbon/NewActivity_16.png"Image32by32="/_imgs/ribbon/newactivity32.png"LabelText="Test"  Sequence="10">

              <

    MenuId="Mscrm.Jewel.NewMenu.newmenuid1.Menu">

                <

    MenuSectionId="new.ApplicationRibbon.newsectionid1.Section"Sequence="10"DisplayMode="Menu16">

                  <

    ControlsId="new.ApplicationRibbon.controlid1.Section.Controls">

                    <

    ButtonCommand="new.NewActivity.email11"Id="new.ApplicationRibbon.buttonid1.Button"LabelText="testing"Sequence="15"/>

                   

                  </

    Controls>

                </

    MenuSection>

              </

    Menu>

            </

    FlyoutAnchor>

          </

    CommandUIDefinition>

        </

    CustomAction>

          </

    CustomActions>

        <

    Templates>

          <

    RibbonTemplatesId="Mscrm.Templates"></RibbonTemplates>

        </

    Templates>

        <

    CommandDefinitions>

         

        <

    CommandDefinitionId="new.NewActivity.email11">

          <

    EnableRules/>

          <

    DisplayRules/>

          <

    Actions>

            <!--

    <JavaScriptFunction></JavaScriptFunction>-->

          </

    Actions>

        </

    CommandDefinition>



         

        </

    CommandDefinitions>

        <

    RuleDefinitions>

          <

    TabDisplayRules/>

          <

    DisplayRules/>

          <

    EnableRules/>

        </

    RuleDefinitions>

        <

    LocLabels/>

      </

    RibbonDiffXml>


    Wednesday, January 29, 2014 11:00 AM
  • Thanks Akhilesh, it worked for me. But I want to add menuitem instead of another menu with-in File menu. I tried removing FlyoutAnchor and used Menu and MenuSections. But it didn't work for me. Can you please guide me to add just the menu item under File Menu.

    Thanks,


    MAKGO

    Wednesday, January 29, 2014 3:45 PM
  • Hi,

    If you want just menu item in existing menu then menu id will be the existing menu id of that menu in which you want to add menu item.

    these are the existing menu ids-

    - Mscrm.Jewel.NewMenu.NewActivity
    - Mscrm.Jewel.NewMenu.NewRecord;

    • Edited by Akhileshrajpoot Thursday, January 30, 2014 4:35 AM
    • Marked as answer by MAKGO Thursday, January 30, 2014 7:41 AM
    Thursday, January 30, 2014 4:27 AM
  • Hi Akhilesh, I have resolved. The menu Id which I was expecting is Mscrm.Jewel.Menu._children. But thanks for giving me the idea.


    MAKGO

    Thursday, January 30, 2014 7:41 AM