How to add a new dropdown item in the action list?

How in suitecrm 8 do I add a new dropdown item in the action list? For example the following

image

Here are samples, in two parts:

I would also advise going into Admin / System settings and changing the checkbox that says something like “show actions in menus”, it makes those buttons always visible, much quicker to use.

@pgr Thanks for answering

I have been trying to implement what you suggest. But I can’t get the logic in the custom view to work. Maybe you could see something I’m missing. Since the logic that I need to modify is in the details view, I try the following

Following de guide

I create the file public/legacy/custom/modules/Cases/views/view.detail.php

With the following content

<?php

if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

require_once 'include/MVC/View/views/view.detail.php';

class CustomCasesViewDetail extends ViewDetail
{
  public function preDisplay()
  {
    parent::preDisplay();

    $test = "do something";
  }
}

I have verified that in public/legacy/modules/Cases/views there is no view view.detail.php, that is why I require include/MVC/View/views/view.detail.php

I have applied Quick Repair and Rebuild but apparently the logic of the view is not executed. I have verified this trying to stop the debugger within the preDisplay method but there has been no success

I have tried to do the same in list view, following the example you shared, but have the same experience. This view logic seems not to be executed. Attached a screenshot of the actions menu with the elements that come by default

image

I would appreciate any ideas about what I am doing wrong or what I can try.

This will only work in legacy views in SuiteCRM 8…

Sorry, I didn’t notice initially that your question was for v8.

There is a much better way of doing this in v8, the UI is more extensible, but nobody really knows how to do it yet. You can only try to copy from existing code. It will likely involve changing a yml file and rebuilding the Angular UI from the command line.

Thank for answering. I guess I’ll have to try adding a custom sidebar widget and extend the functionality there