Issue Adding Icons/Buttons and Performing Actions with JavaScript in List View [contacts module]

Hey @Anitha,

SuiteCRM 8 uses angular, I don’t think that code will work.

I searched the forum for suitecrm 8 add button and found the following which might help you:

The following page on the documentation might also help, since the threads above mention the Process:

Lastly, I’ve also tried to search for actions in all listviewdefs.php files. Found the Accounts ‘records-to-target-list’ bulk action example on the core code which might be useful:

file: public/legacy/modules/Accounts/metadata/listviewdefs.php

sample code:

        'bulkActions' => [
            'actions' => [
                'records-to-target-list' => [
                    'key' => 'records-to-target-list',
                    'labelKey' => 'LBL_ADD_TO_PROSPECT_LIST_BUTTON_LABEL',
                    'modes' => ['list'],
                    'acl' => ['edit'],
                    'aclModule' => 'prospect-lists',
                    'params' => [
                        'selectModal' => [
                            'module' => 'ProspectLists'
                        ],
                        'allowAll' => false,
                        'max' => 200
                    ]
                ],

Then by searching for records-to-target-list in the codebase found the following, which should be the handler for the records-to-target-list:

core/backend/Process/LegacyHandler/AddRecordsToTargetListBulkActionHandler.php

1 Like