Add dropdown action button SuiteCRM 8.6

Hi everyone,
Does anyone know how to add a dropdown button in detail view with other buttons inside?
I have been able to add a button as follows, but I am unable to transform it into a dropdown button:

    'recordActions' => 
    array (
      'actions' => 
      array (
        'cases-button-custom' => 
        array (
          'key' => 'cases-button-custom',
          'labelKey' => 'LBL_BUTTON_CUSTOM',
          'asyncProcess' => true,
          'modes' => ['detail'],
          'acl' => ['view'],
          'params' => [
              'expanded' => true,
          ],
        ),
      ),
    ),

I think you will find a solution here:

Blog:

Please remove this or set ‘expanded’ => false, and try. I was able to add a new button in Accounts with the following recordaction definition

'hello-world' => [
				  'key' => 'hello-world',
                  'labelKey' => 'LBL_HELLO_WORLD',
                  'asyncProcess' => true,
                  'modes' => ['detail','edit'],
			  ],

image

1 Like

Hi, thanks for the reply!

I have already managed to add a button inside the ‘Actions’ dropdown and also outside.
What I need is to add a dropdown button like the ‘Actions’:
dropdown

Oh okay! Is it an another list of records’ actions next to current drop down list of actions? Thought it looks doable by some code changes but I have not seen two different set of actions on the same view.I am not sure if it done just by defining another ‘recordActions’ in the detailviewdefs.php of a module.

That would only be possible by enhancing the front-end Angular code, currently it looks like this:

SuiteCRM-Core/core/app/core/src/lib/components/button-group/button-group.component.html at hotfix · salesagility/SuiteCRM-Core · GitHub

As you can see, it renders the expanded buttons, then the collapsed ones in the drop-down; but it is not ready to render any other drop-downs.

2 Likes