locked
adding custom button / menu in toolbar in ms crm 4.0 RRS feed

  • Question

  •  

    hi ,

     

    i am facing much difficulty to add custton button / menu in ms crm 4.0.

    please figure out some steps to be followed while adding custom button in isvconfig.xml file

     

    i hav to add following piece of code in that xml file

     

    <MenuBar>

    <Buttons>

    <ToolBarSpacer />

    <Button

    Title="Appointment Summary"

    Client="Web, Outlook"

    ToolTip="Appointment Summary"

    Icon="/_imgs/ico_16_4230_d.gif" JavaScript="window.open('/AppointmentSummary.aspx?EntityCode=2

    &amp;QueryId={8AE34E2D-36B6-DC11-A19C-001731B019EA}

    &amp;ViewType=1039');"

    />

    </Buttons>

    </MenuBar>

     

     

    Thanks & Regards

     

    Kumar

    Thursday, April 10, 2008 3:44 AM

Answers

  • Hi Kumars2m,

     

    Firstly, MenuBar doesn't contains any "button" tags.ToolBars has buttons. So if you are trying to add button under menubar, its not going to work. Go to the toolbar tag and create a button under that tag.

    This is what the menubar tag contains. They have <CustomMenus> <Menu> <MenuItem> <SubMenu>

    see example below.

    <MenuBar>
              <!-- Custom Menus that appear between the Goto Menu and the Help Menu -->
              <CustomMenus>
                <Menu>
                  <Titles>
                    <Title LCID="1033" Text="ISV" />
                  </Titles>
                  <MenuItem Url="http://www.microsoft.com">
                    <Titles>
                      <Title LCID="1033" Text="New Window" />
                    </Titles>
                  </MenuItem>
                  <MenuSpacer />
                  <!-- A horizontal drop down menu spacer -->
                  <SubMenu>
                    <Titles>
                      <Title LCID="1033" Text="ISV Tests" />
                    </Titles>
                    <MenuItem Url="http://www.microsoft.com" WinMode="2">
                      <Titles>
                        <Title LCID="1033" Text="Modeless Dialog" />
                      </Titles>
                    </MenuItem>
                    <MenuSpacer />
                    <MenuItem Url="http://www.microsoft.com" WinMode="1">
                      <Titles>
                        <Title LCID="1033" Text="Modal Dialog" />
                      </Titles>
                    </MenuItem>
                    <MenuSpacer />
                    <MenuItem JavaScript="alert('test');">
                      <Titles>
                        <Title LCID="1033" Text="Custom JavaScript" />
                      </Titles>
                    </MenuItem>
                  </SubMenu>
                </Menu>
              </CustomMenus>

    </MenuBar>

     

    Export the ISV.config file, open it in an editor and see where you want to add your custom button. It is easy to figure out from there.

    Also check if your customizations are enabled.

    click Settings, click Administration, and then click System Settings. Select the Customization tab. In the Custom menus and toolbars area, set the Clients value to include the clients to enable custom controls. You can select any combination of clients.

    The available clients are as follows:

    • Outlook (Microsoft Dynamics CRM for Microsoft Office Outlook)
    • Outlook Offline (Microsoft Dynamics CRM for Microsoft Office Outlook with Offline Access)
    • Web Application

    U gotta check them to enable customization viewable.

     

    Download the latest CRM 4 SDK for more help.

     

    Regards

    http://mscrmnovice.blogspot.com

    Thursday, April 10, 2008 8:14 AM
  • To enable your customizations, in the Navigation Pane, click Settings, click Administration, and then click System Settings. Select the Customization tab. In the Custom menus and toolbars area, set the Clients value to include the clients to enable custom controls. You can select any combination of clients.

    The available clients are as follows:

    • Outlook (Microsoft Dynamics CRM for Microsoft Office Outlook)
    • Outlook Offline (Microsoft Dynamics CRM for Microsoft Office Outlook with Offline Access)
    • Web Application

    The Custom menus and toolbars setting is used as a performance optimization. When there are no client extensions to be rendered, no clients should be selected.

     

    import the isv.config  you will see all  

     

    go to settings-> administrator > system setting >  customization tab and then enable the client for web / outlook etc.

     

    after that close browser and run it again it will wokr.

     

     

    <!-- Custom Menus that appear between the Goto Menu and the Help Menu -->
         <CustomMenus>
          <Menu>
           <Titles>
            <Title LCID="1033" Text="ISV" />
           </Titles>
           <MenuItem Url="http://www.microsoft.com">
            <Titles>
             <Title LCID="1033" Text="New Window" />
            </Titles>
           </MenuItem>
           <MenuSpacer />
    <!-- A horizontal drop down menu spacer -->
           <SubMenu>
            <Titles>
             <Title LCID="1033" Text="ISV Tests" />
            </Titles>
            <MenuItem Url="http://www.microsoft.com" WinMode="2">
             <Titles>
              <Title LCID="1033" Text="Modeless Dialog" />
             </Titles>
            </MenuItem>
            <MenuSpacer />
            <MenuItem Url="http://www.microsoft.com" WinMode="1">
             <Titles>
              <Title LCID="1033" Text="Modal Dialog" />
             </Titles>
            </MenuItem>
            <MenuSpacer />
            <MenuItem JavaScript="alert('test');">
             <Titles>
              <Title LCID="1033" Text="Custom JavaScript" />
             </Titles>
            </MenuItem>
           </SubMenu>
          </Menu>
         </CustomMenus>
        </MenuBar>
    <!-- Application Level Tool Bar -->
        <ToolBar>
         <Button Icon="/_imgs/ico_18_debug.gif" JavaScript="alert('test');">
          <Titles>
           <Title LCID="1033" Text="Test" />
          </Titles>
          <ToolTips>
           <ToolTip LCID="1033" Text="Info on Test" />
          </ToolTips>
         </Button>
         <ToolBarSpacer />
    <!-- A vertical toolbar spacer -->
         <Button Icon="/_imgs/ico_18_debug.gif" JavaScript="alert('test');"
                 Client="Web">
          <Titles>
           <Title LCID="1033" Text="Web Only" />
          </Titles>
          <ToolTips>
           <ToolTip LCID="1033"
                    Text="Web client only.This will not show up in any outlook pages." />
          </ToolTips>
         </Button>
         <Button Icon="/_imgs/ico_18_debug.gif" JavaScript="alert('test');"
                 Client="Outlook" AvailableOffline="true">
          <Titles>
           <Title LCID="1033" Text="Outlook Only" />
          </Titles>
          <ToolTips>
           <ToolTip LCID="1033"
                    Text="Outlook Only - This is available offline also." />
          </ToolTips>
         </Button>
         <Button Icon="/_imgs/ico_18_debug.gif" JavaScript="alert('test');"
                 Client="Web, Outlook" AvailableOffline="true">
          <Titles>
           <Title LCID="1033" Text="Both" />
          </Titles>
          <ToolTips>
           <ToolTip LCID="1033"
                    Text="Both Clients - This is available for both Web and Outlook Clients" />
          </ToolTips>
         </Button>
        </ToolBar>
       </Root>
    <!-- Microsoft Customer Relationship Management Entities (Objects) -->
       <Entities>
        <Entity name="account">
         <MenuBar>
    <!-- Custom Menus that you may add -->
          <CustomMenus>
           <Menu>
            <Titles>
             <Title LCID="1033" Text="ISV.NEW" />
            </Titles>
            <MenuItem Url="http://www.microsoft.com" PassParams="0"
                      WinMode="1">
             <Titles>
              <Title LCID="1033" Text="Coming Soon..." />
             </Titles>
            </MenuItem>
            <MenuSpacer />
            <SubMenu>
             <Titles>
              <Title LCID="1033" Text="Sub Test" />
             </Titles>
             <MenuItem Url="http://www.microsoft.com" PassParams="1">
              <Titles>
               <Title LCID="1033" Text="Test Sub 1" />
              </Titles>
             </MenuItem>
             <MenuSpacer />
             <MenuItem>
              <Titles>
               <Title LCID="1033" Text="Test Sub 2" />
              </Titles>
             </MenuItem>
            </SubMenu>
            <MenuSpacer />
            <MenuItem Url="http://www.microsoft.com" PassParams="0">
             <Titles>
              <Title LCID="1033" Text="Coming Soon..." />
             </Titles>
            </MenuItem>
            <MenuItem Client="Web">
             <Titles>
              <Title LCID="1033" Text="Web Only" />
             </Titles>
            </MenuItem>
            <MenuItem Client="Outlook" AvailableOffline="true">
             <Titles>
              <Title LCID="1033" Text="Outlook Only" />
             </Titles>
            </MenuItem>
            <MenuSpacer />
            <MenuItem ValidForCreate="0">
             <Titles>
              <Title LCID="1033" Text="Valid For Update Only" />
             </Titles>
            </MenuItem>
            <MenuItem ValidForUpdate="0">
             <Titles>
              <Title LCID="1033" Text="Valid For Create Only" />
             </Titles>
            </MenuItem>
           </Menu>
          </CustomMenus>
         </MenuBar>
    <!-- The Account Tool Bar -->
         <ToolBar ValidForCreate="0" ValidForUpdate="1">
          <Button Icon="/_imgs/ico_18_debug.gif"
                  Url="http://www.microsoft.com" PassParams="1"
                  WinParams="" WinMode="0">
           <Titles>
            <Title LCID="1033" Text="asdf" />
           </Titles>
           <ToolTips>
            <ToolTip LCID="1033" Text="Info on Test" />
           </ToolTips>
          </Button>
          <ToolBarSpacer />
          <Button Icon="/_imgs/ico_18_debug.gif"
                  Url="http://www.microsoft.com" PassParams="1" WinParams=""
                  WinMode="1">
           <Titles>
            <Title LCID="1033" Text="Test" />
           </Titles>
           <ToolTips>
            <ToolTip LCID="1033" Text="Info on Test" />
           </ToolTips>
          </Button>
          <Button Icon="/_imgs/ico_18_debug.gif" JavaScript="alert('test');"
                  Client="Web">
           <Titles>
            <Title LCID="1033" Text="Web Only" />
           </Titles>
           <ToolTips>
            <ToolTip LCID="1033" Text="Web client only. This will not show up in any outlook pages." />
           </ToolTips>
          </Button>
          <Button Icon="/_imgs/ico_18_debug.gif" JavaScript="alert('test');"
                  Client="Outlook" AvailableOffline="true">
           <Titles>
            <Title LCID="1033" Text="Outlook Only" />
           </Titles>
           <ToolTips>
            <ToolTip LCID="1033" Text="Outlook Only - This is available offline also." />
           </ToolTips>
          </Button>
         </ToolBar>

     

     

    Regards,

    Imran

    http://microsoftcrm3.blogspot.com

     

    Thursday, April 10, 2008 9:47 AM
    Moderator

All replies

  • Hi Kumars2m,

     

    Firstly, MenuBar doesn't contains any "button" tags.ToolBars has buttons. So if you are trying to add button under menubar, its not going to work. Go to the toolbar tag and create a button under that tag.

    This is what the menubar tag contains. They have <CustomMenus> <Menu> <MenuItem> <SubMenu>

    see example below.

    <MenuBar>
              <!-- Custom Menus that appear between the Goto Menu and the Help Menu -->
              <CustomMenus>
                <Menu>
                  <Titles>
                    <Title LCID="1033" Text="ISV" />
                  </Titles>
                  <MenuItem Url="http://www.microsoft.com">
                    <Titles>
                      <Title LCID="1033" Text="New Window" />
                    </Titles>
                  </MenuItem>
                  <MenuSpacer />
                  <!-- A horizontal drop down menu spacer -->
                  <SubMenu>
                    <Titles>
                      <Title LCID="1033" Text="ISV Tests" />
                    </Titles>
                    <MenuItem Url="http://www.microsoft.com" WinMode="2">
                      <Titles>
                        <Title LCID="1033" Text="Modeless Dialog" />
                      </Titles>
                    </MenuItem>
                    <MenuSpacer />
                    <MenuItem Url="http://www.microsoft.com" WinMode="1">
                      <Titles>
                        <Title LCID="1033" Text="Modal Dialog" />
                      </Titles>
                    </MenuItem>
                    <MenuSpacer />
                    <MenuItem JavaScript="alert('test');">
                      <Titles>
                        <Title LCID="1033" Text="Custom JavaScript" />
                      </Titles>
                    </MenuItem>
                  </SubMenu>
                </Menu>
              </CustomMenus>

    </MenuBar>

     

    Export the ISV.config file, open it in an editor and see where you want to add your custom button. It is easy to figure out from there.

    Also check if your customizations are enabled.

    click Settings, click Administration, and then click System Settings. Select the Customization tab. In the Custom menus and toolbars area, set the Clients value to include the clients to enable custom controls. You can select any combination of clients.

    The available clients are as follows:

    • Outlook (Microsoft Dynamics CRM for Microsoft Office Outlook)
    • Outlook Offline (Microsoft Dynamics CRM for Microsoft Office Outlook with Offline Access)
    • Web Application

    U gotta check them to enable customization viewable.

     

    Download the latest CRM 4 SDK for more help.

     

    Regards

    http://mscrmnovice.blogspot.com

    Thursday, April 10, 2008 8:14 AM
  • To enable your customizations, in the Navigation Pane, click Settings, click Administration, and then click System Settings. Select the Customization tab. In the Custom menus and toolbars area, set the Clients value to include the clients to enable custom controls. You can select any combination of clients.

    The available clients are as follows:

    • Outlook (Microsoft Dynamics CRM for Microsoft Office Outlook)
    • Outlook Offline (Microsoft Dynamics CRM for Microsoft Office Outlook with Offline Access)
    • Web Application

    The Custom menus and toolbars setting is used as a performance optimization. When there are no client extensions to be rendered, no clients should be selected.

     

    import the isv.config  you will see all  

     

    go to settings-> administrator > system setting >  customization tab and then enable the client for web / outlook etc.

     

    after that close browser and run it again it will wokr.

     

     

    <!-- Custom Menus that appear between the Goto Menu and the Help Menu -->
         <CustomMenus>
          <Menu>
           <Titles>
            <Title LCID="1033" Text="ISV" />
           </Titles>
           <MenuItem Url="http://www.microsoft.com">
            <Titles>
             <Title LCID="1033" Text="New Window" />
            </Titles>
           </MenuItem>
           <MenuSpacer />
    <!-- A horizontal drop down menu spacer -->
           <SubMenu>
            <Titles>
             <Title LCID="1033" Text="ISV Tests" />
            </Titles>
            <MenuItem Url="http://www.microsoft.com" WinMode="2">
             <Titles>
              <Title LCID="1033" Text="Modeless Dialog" />
             </Titles>
            </MenuItem>
            <MenuSpacer />
            <MenuItem Url="http://www.microsoft.com" WinMode="1">
             <Titles>
              <Title LCID="1033" Text="Modal Dialog" />
             </Titles>
            </MenuItem>
            <MenuSpacer />
            <MenuItem JavaScript="alert('test');">
             <Titles>
              <Title LCID="1033" Text="Custom JavaScript" />
             </Titles>
            </MenuItem>
           </SubMenu>
          </Menu>
         </CustomMenus>
        </MenuBar>
    <!-- Application Level Tool Bar -->
        <ToolBar>
         <Button Icon="/_imgs/ico_18_debug.gif" JavaScript="alert('test');">
          <Titles>
           <Title LCID="1033" Text="Test" />
          </Titles>
          <ToolTips>
           <ToolTip LCID="1033" Text="Info on Test" />
          </ToolTips>
         </Button>
         <ToolBarSpacer />
    <!-- A vertical toolbar spacer -->
         <Button Icon="/_imgs/ico_18_debug.gif" JavaScript="alert('test');"
                 Client="Web">
          <Titles>
           <Title LCID="1033" Text="Web Only" />
          </Titles>
          <ToolTips>
           <ToolTip LCID="1033"
                    Text="Web client only.This will not show up in any outlook pages." />
          </ToolTips>
         </Button>
         <Button Icon="/_imgs/ico_18_debug.gif" JavaScript="alert('test');"
                 Client="Outlook" AvailableOffline="true">
          <Titles>
           <Title LCID="1033" Text="Outlook Only" />
          </Titles>
          <ToolTips>
           <ToolTip LCID="1033"
                    Text="Outlook Only - This is available offline also." />
          </ToolTips>
         </Button>
         <Button Icon="/_imgs/ico_18_debug.gif" JavaScript="alert('test');"
                 Client="Web, Outlook" AvailableOffline="true">
          <Titles>
           <Title LCID="1033" Text="Both" />
          </Titles>
          <ToolTips>
           <ToolTip LCID="1033"
                    Text="Both Clients - This is available for both Web and Outlook Clients" />
          </ToolTips>
         </Button>
        </ToolBar>
       </Root>
    <!-- Microsoft Customer Relationship Management Entities (Objects) -->
       <Entities>
        <Entity name="account">
         <MenuBar>
    <!-- Custom Menus that you may add -->
          <CustomMenus>
           <Menu>
            <Titles>
             <Title LCID="1033" Text="ISV.NEW" />
            </Titles>
            <MenuItem Url="http://www.microsoft.com" PassParams="0"
                      WinMode="1">
             <Titles>
              <Title LCID="1033" Text="Coming Soon..." />
             </Titles>
            </MenuItem>
            <MenuSpacer />
            <SubMenu>
             <Titles>
              <Title LCID="1033" Text="Sub Test" />
             </Titles>
             <MenuItem Url="http://www.microsoft.com" PassParams="1">
              <Titles>
               <Title LCID="1033" Text="Test Sub 1" />
              </Titles>
             </MenuItem>
             <MenuSpacer />
             <MenuItem>
              <Titles>
               <Title LCID="1033" Text="Test Sub 2" />
              </Titles>
             </MenuItem>
            </SubMenu>
            <MenuSpacer />
            <MenuItem Url="http://www.microsoft.com" PassParams="0">
             <Titles>
              <Title LCID="1033" Text="Coming Soon..." />
             </Titles>
            </MenuItem>
            <MenuItem Client="Web">
             <Titles>
              <Title LCID="1033" Text="Web Only" />
             </Titles>
            </MenuItem>
            <MenuItem Client="Outlook" AvailableOffline="true">
             <Titles>
              <Title LCID="1033" Text="Outlook Only" />
             </Titles>
            </MenuItem>
            <MenuSpacer />
            <MenuItem ValidForCreate="0">
             <Titles>
              <Title LCID="1033" Text="Valid For Update Only" />
             </Titles>
            </MenuItem>
            <MenuItem ValidForUpdate="0">
             <Titles>
              <Title LCID="1033" Text="Valid For Create Only" />
             </Titles>
            </MenuItem>
           </Menu>
          </CustomMenus>
         </MenuBar>
    <!-- The Account Tool Bar -->
         <ToolBar ValidForCreate="0" ValidForUpdate="1">
          <Button Icon="/_imgs/ico_18_debug.gif"
                  Url="http://www.microsoft.com" PassParams="1"
                  WinParams="" WinMode="0">
           <Titles>
            <Title LCID="1033" Text="asdf" />
           </Titles>
           <ToolTips>
            <ToolTip LCID="1033" Text="Info on Test" />
           </ToolTips>
          </Button>
          <ToolBarSpacer />
          <Button Icon="/_imgs/ico_18_debug.gif"
                  Url="http://www.microsoft.com" PassParams="1" WinParams=""
                  WinMode="1">
           <Titles>
            <Title LCID="1033" Text="Test" />
           </Titles>
           <ToolTips>
            <ToolTip LCID="1033" Text="Info on Test" />
           </ToolTips>
          </Button>
          <Button Icon="/_imgs/ico_18_debug.gif" JavaScript="alert('test');"
                  Client="Web">
           <Titles>
            <Title LCID="1033" Text="Web Only" />
           </Titles>
           <ToolTips>
            <ToolTip LCID="1033" Text="Web client only. This will not show up in any outlook pages." />
           </ToolTips>
          </Button>
          <Button Icon="/_imgs/ico_18_debug.gif" JavaScript="alert('test');"
                  Client="Outlook" AvailableOffline="true">
           <Titles>
            <Title LCID="1033" Text="Outlook Only" />
           </Titles>
           <ToolTips>
            <ToolTip LCID="1033" Text="Outlook Only - This is available offline also." />
           </ToolTips>
          </Button>
         </ToolBar>

     

     

    Regards,

    Imran

    http://microsoftcrm3.blogspot.com

     

    Thursday, April 10, 2008 9:47 AM
    Moderator
  • Hi,

    Can we add image in manue bar.   like MS did against advanced Find?

     

    Thanks


    ja
    Friday, May 7, 2010 5:36 AM
  • Hi ja08, if you go to my tools site, you will find a tool that allows you to build the ISV.Config file in a graphical way...

    So you will see all available options for a menu or button, etc.

    tool tutorial : http://mscrmtools.wordpress.com/tools/isv-configuration-manager/

    download page: http://mscrmtools.wordpress.com/tools/


    My blog : http://mscrmtools.blogspot.com

    All my tools on my new dedicated site: MSCRMTools Repository
    • Proposed as answer by Maryam_r Saturday, February 25, 2012 2:19 AM
    • Unproposed as answer by Maryam_r Saturday, February 25, 2012 2:20 AM
    Friday, May 7, 2010 7:21 AM
    Moderator