Having similar Delegates subpanel on custom module like the one on Events

Hi,
I want to have similar subpanel of Delegates like its there on Events its a different subpanel which also has filter options.
I have a custom where I want the same Delegates subpanel.

To achieve this I created a relationship from The custom module to delegates which is giving me a normal subpanel.
I have then create a custom subpaneldefs.php to achieve customizations but with no success.

Can anyone please help me do this.

My code on custom/modules//metadata/subpaneldefs.php


$layout_defs['FP_Event_Sessions'] = array(
    // list of what Subpanels to show in the DetailView
    'subpanel_setup' => array(

        'delegates' => array(
            'order' => 10,
            'sort_order' => 'desc',
            'title_key' => 'LBL_DEFAULT_SUBPANEL_TITLE',
            'type' => 'collection',
            'subpanel_name' => 'delegates',   //this values is not associated with a physical file.
            'header_definition_from_subpanel'=> 'Contacts',
            'module'=>'Delegates',

            'top_buttons' => array(
                array('widget_class' => 'SubPanelDelegatesSelectButton'),
                array('widget_class' => 'SubPanelManageDelegatesButton'),
                array('widget_class' => 'SubPanelManageAcceptancesButton'),
                array('widget_class' => 'SubPanelSendInvitesButton'),
                array('widget_class' => 'SubPanelCheck'),
                array('widget_class' => 'SubPanelTopFilterButton'),
            ),

            'collection_list' => array(
                'prospects' => array(
                    'module' => 'Prospects',
                    'subpanel_name' => 'FP_Event_Sessions_subpanel_fp_event_sessions_prospects_1',
                    'get_subpanel_data' => 'fp_event_sessions_prospects_1',
                )
            ),
            'searchdefs' => array(
                'first_name' =>
                    array(
                        'name' => 'first_name',
                        'default' => true,
                        'width' => '10%',
                    ),
                'last_name' =>
                    array(
                        'name' => 'last_name',
                        'default' => true,
                        'width' => '10%',
                    ),
            ),
        ),
    ),
);

Note that Events and Delegates is a module of SuiteCRM that is a bit different from all others, it is not very standard in the way it is constructed.

Maybe it’s better to avoid a custom module, and instead use a customized version of the existing Events module? This might make things a lot simpler.