AnsweredAssumed Answered

How can I add an option to the action menu on the detail view?

Question asked by kasim kasim on Jun 6, 2014
Latest reply on Jun 24, 2014 by kasim kasim
I need to add action menu as shown in image on detail view.I have already referred following topic to achieve this, but it's not working for detail view.

        require_once('include/MVC/View/views/view.detail.php');
    class CustomAccountsViewDetail extends ViewDetail {
    function preDisplay() {
    parent::preDisplay();
    $this->dv->actionsMenuExtraItems[] = $this->buildMyMenuItem();
    }
    function buildMyMenuItem(){
    global $app_strings;
    return <<<EOHTML
    <a class="menuItem" style="width: 150px;" href="#" onmouseover='hiliteItem(this,"yes");' 
    onmouseout='unhiliteItem(this);' 
    onclick="sugarListView.get_checks();
    if(sugarListView.get_checks_count() &lt; 1) {
    alert('{$app_strings['LBL_LISTVIEW_NO_SELECTED']}');
    return false;
            }
            document.MassUpdate.action.value='displaypassedids';
            document.MassUpdate.submit();">Send records to a new view!</a>
    EOHTML;
            }
     
    }

I have added following code in \custom\Modules\Account\views\view.detail.php


http://stackoverflow.com/questions/9259835/adding-new-option-in-the-action-button-of-sugarcrm  

Thanks


Outcomes