locked
New Quote Product Button issue RRS feed

  • Question

  • Hi,
    I need to know how i can disable or delete the "New Quote Product" button from the quote.
    Thanks in advance
    Wednesday, February 4, 2009 2:07 PM

Answers

  • Try This in form load ....:

    //****************************************************************************

    // JSCRIPT FUNCTION FOR REMOVING BUTTONS ON ASSOCIATED VIEW

    //****************************************************************************


    HideAssociatedViewButtonsSystem('areaExistingProducts', ['Add a new Quote Product to this record'], 'ExistingProducts');


    //Function For System Entitty Associated View

    function HideAssociatedViewButtonsSystem(loadAreaId, buttonTitles, NavName)

    {   

    var navElement = document.getElementById('nav' + NavName);   

    if (navElement != null)   

    {       

    navElement.onclick = function LoadAreaOverride()       

    {           

    loadArea(loadAreaId);           

    HideViewButtons(document.getElementById(loadAreaId + 'Frame'), buttonTitles);       

    }}} 



     

    //Function For Custom Entity Associate View

    function HideAssociatedViewButtonsCustom(loadAreaId, buttonTitles)

    {   

    var navElement = document.getElementById('nav_' + loadAreaId);   

    if (navElement != null)   

    {       

    navElement.onclick = function LoadAreaOverride()       

    {           

    loadArea(loadAreaId);           

    HideViewButtons(document.getElementById(loadAreaId + 'Frame'), buttonTitles);       

    }}}   



     

     

    function HideViewButtons(Iframe, buttonTitles)

    {    

    if (Iframe != null )

    {       

    Iframe.onreadystatechange = function HideTitledButtons()

    {             if (Iframe.readyState == 'complete')

    {                

    var iFrame = frames[window.event.srcElement.id];                

    var liElements = iFrame.document.getElementsByTagName('li');                 

    for (var j = 0; j < buttonTitles.length; j++)

    {                    

    for (var i = 0; i < liElements.length; i++)

    {                        

    if (liElements[i].getAttribute('title') == buttonTitles[j])

    {                            

    liElements[i].style.display = 'none';                            

    break;                        

    }}}}}}}




     

    Thursday, February 5, 2009 12:25 AM