locked
How to hide "Add existing...-entity" menu item RRS feed

  • Question

  • With user created entities you always have a menu item next to "new: ..." that has the label "add existing ..." or however it is called in the english version. ;)

    Some user asked whether that menu item could be hide? As far as I get ISV.Config you only can add menu items not hide them.
    Monday, December 21, 2009 1:50 PM

Answers

All replies

  • I suggest you to use search engines first before ask question here.
    Answer - it could be hidden using JavaScript approach .
    Truth is opened the prepared mind My blog - http://a33ik.blogspot.com
    Monday, December 21, 2009 1:53 PM
    Moderator
  • Monday, December 21, 2009 1:54 PM
  • Hi,

    If i under stand correctly you want to remove 'Add existing...............' button from the associated view's toolbar. you can do this.
    Please Check this URL

    http://blog.davehawes.com/post/2008/04/23/MSCRM-4-Remove-Add-Existing-xxxxx-button.aspx

    Mahain
    Monday, December 21, 2009 1:56 PM
    Moderator
  • Thanks for all your replies. I copy and pasted the code from MayankP's URL.

    How do I find out which parameters I need for HideAssociatedViewButtons(loadAreaId, buttonTitles)?

    Monday, December 21, 2009 2:36 PM
  • Hi,

    It takes two parameters
    1. Left navigation item id
    2. Lable of the button.

    To get navigation item id you need to use IE toolbar.

    Hope it will help you !!!!
    Mahain
    Monday, December 21, 2009 2:43 PM
    Moderator
  • I tried a few things, but it never works.

    Here is my "Button-Code",
    <li tabIndex="-1" title="Vorh. Projektpositionen zu diesem Datensatz hinzufügen." class="ms-crm-Menu" id="_MBtoplocAssocOneToMany10017iqiqprojekteiqprojektpositionen" onclick="window.execScript(action)" action="top.locAssocOneToMany(10017, "iq_iq_projekte_iq_projektpositionen");">
    And thats my function call:

    HideAssociatedViewButtons('_MBtoplocAssocOneToMany10017iqiqprojekteiqprojektpositionen', ['Vorh. Kandidat zu diesem Datensatz hinzufügen.']);

    "Vorh. Projektpositionen zu diesem Datensatz hinzufügen" means "Add existing project position to record".
    Monday, December 21, 2009 2:49 PM
  • Hey,

    you need to find name of the dataArea div tag from left navigation. you can use IE toolbar to get it.
    Mahain
    Monday, December 21, 2009 3:00 PM
    Moderator
  • Could you please explain me in detail where exactly I have to click with the IE toolbar? I use the search-function where you have to click an element (that gets then a blue frame) and displays the html-code.
    Monday, December 21, 2009 3:07 PM
  • Hi,

    I don't have IE installed in my system but i think you have to select "get selected item" form IE toolbar menu
    When you  select Link item from left navigation from left navigation bar and select the View area from right side you need to get id of the associated view area.

    Hope it will help you !!!

    Mahain
    Monday, December 21, 2009 3:37 PM
    Moderator