![enter image description here](https://i.stack.imgur.com/MQV8d.png)

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.

[Adding new option in the action button of sugarCRM](https://stackoverflow.com/questions/9259835/adding-new-option-in-the-action-button-of-sugarcrm) 

```
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
Thanks