locked
Custom Nav Items RRS feed

  • Question

  • Hi All,

    I am having a problem adding two custom nav items. I have a custom entity and I require two nav items on the left side that point to custom aspx pages.

    When I add 1 nav menu item, everything works fine, but as soon as I add a second, I have a problem toggling between the two of them. Below you will see my snippet of the ISV.Config file. You will notice I have two nav bar items. When I first open the entity form, I can click on the first button but when I click on the second, nothing happens. Conversely, when I first open and I click on the second button first, it opens the correct page. But when i try to click on the first button, nothing happens.

    So, both pages are working propery, it's just that the form only allows me to view one of them, depending on which one I click first. Has anyone had any problem adding multiple custom nav menu items to an entity? Or, do you see any problems with the code below?


            <Entity name="myCustomEntity">
              <NavBar>
                <NavBarItem Icon="/_imgs/anh_checklistItemIconSmall.gif" Url=myCustomUrl + "/IFRAME_BuilderRegistrationChecklist.aspx" PassParams="1" Id="navItem">
                  <Titles>
                    <Title LCID="1033" Text="Checklist Items" />
                  </Titles>
                </NavBarItem>
         <NavBarItem Icon="/_imgs/anh_companyConstructionActivityIconSmall.gif" Url=myCustomUrl + "/IFRAME_ConstructionActivity.aspx" PassParams="1" Id="navItem">
                  <Titles>
                    <Title LCID="1033" Text="Construction Activity" />
                  </Titles>
                </NavBarItem>
              </NavBar>
            </Entity>
           
    Tuesday, November 3, 2009 8:47 PM

Answers

  • Hi,

    the id of a NavBarItem has to be unique. Your items have the same id. This should produce your problem. Assign a unique id to each NavBarItem, and it should work
    • Proposed as answer by ckeller Sunday, November 15, 2009 10:42 AM
    • Marked as answer by Donna EdwardsMVP Sunday, November 15, 2009 5:11 PM
    Wednesday, November 4, 2009 4:52 PM

All replies

  • Hi,

    the id of a NavBarItem has to be unique. Your items have the same id. This should produce your problem. Assign a unique id to each NavBarItem, and it should work
    • Proposed as answer by ckeller Sunday, November 15, 2009 10:42 AM
    • Marked as answer by Donna EdwardsMVP Sunday, November 15, 2009 5:11 PM
    Wednesday, November 4, 2009 4:52 PM
  • Change the NavBarItem Id (yellow highlighted). It should be unique.

    <Entity name="myCustomEntity">
              <NavBar>
                <NavBarItem Icon="/_imgs/anh_checklistItemIconSmall.gif" Url=myCustomUrl + "/IFRAME_BuilderRegistrationChecklist.aspx" PassParams="1" Id="navItem">
                  <Titles>
                    <Title LCID="1033" Text="Checklist Items" />
                  </Titles>
                </NavBarItem>
         <NavBarItem Icon="/_imgs/anh_companyConstructionActivityIconSmall.gif" Url=myCustomUrl + "/IFRAME_ConstructionActivity.aspx" PassParams="1" Id="navItem">
                  <Titles>
                    <Title LCID="1033" Text="Construction Activity" />
                  </Titles>
                </NavBarItem>
              </NavBar>
            </Entity>


    Thanks, Ranjitsingh R | http://mscrm-developer.blogspot.com/
    Thursday, November 5, 2009 5:11 AM
  • Hi Trallan,

    Instead of writing in the isv.config to customize the navigation Microsoft released a wonderful tool CRM Demonstration Tools, using it you can customize the site map very easily

    download link: http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=634508dc-1762-40d6-b745-b3bde05d7012 

    Sorry Tool works only for main navigation not entity internal navigation

    Thanks,
    Thursday, November 5, 2009 10:43 AM