locked
Add existing button RRS feed

  • Question

  •  

    Hi all,

     

    Can any one tell me, how to hide the "Add existing contact button" ?

     

    Please tell me its urgent.

     

    Thanks,

    Meenu

    Tuesday, January 27, 2009 9:13 AM

Answers

  • Hi,

     

    You need to use the IE Developer Toolbar to find out the last 3 parameters in your CRM.

     

    Cheers,

    Jim

     

    Tuesday, January 27, 2009 2:23 PM
    Moderator

All replies

  • Meenu,

     

    This code will hide the Add Existing Contacts from Account entity, put it into Account.OnLoad:

     

    Code Snippet

    _navid = 'navContacts';

    _areaifrmid = 'areaContactsFrame';

    _addnewbtnid = '_MBlocAddRelatedToNonForm21GUID';

    _addexistingbtnid = '_MBtoplocAssocOneToMany2contactcustomeraccounts';

     

    //check if area is loaded and if so hide the btns

    _tryhide = function()

    {

        try

        {

            with (document.all[_areaifrmid].contentWindow.document)

            {

                if (readyState != 'complete')

                    return;

                setTimeout(arguments.callee,100);

                getElementById(_addnewbtnid).style.display='none';

                with (getElementById(_addexistingbtnid))

                {

                    style.display='none';

                    nextSibling.style.display='none'; //hide the spacer as well

                }

            }

        }

        catch(e)

        {

            return setTimeout(arguments.callee,100);

        }

    }

     

    document.getElementById(_navid).attachEvent('onclick',_tryhide);

     

     

     

    More info see: http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.crm.developer&tid=9629e26b-4695-4238-9dfe-23cc20348dae

     

    Cheers,

    Jim

    Tuesday, January 27, 2009 9:54 AM
    Moderator
  • Hi,
    this script is not working ... can u tell me what are last 3 parameters ? and how do i find out the guid of this buttons.?

    I have created new entity and created relationship with contact. I am showing the records of this new entity in iframe but i don't want to show "Add Existing TA" button in iframe.

    Please let me ASAP

    Thanks,
    Meenu
    Tuesday, January 27, 2009 11:49 AM
  • Hi,

     

    You need to use the IE Developer Toolbar to find out the last 3 parameters in your CRM.

     

    Cheers,

    Jim

     

    Tuesday, January 27, 2009 2:23 PM
    Moderator