SugarCRM7 HOW TO: add subpanels for related custom modules

Idea created by Francesca Shiekh on Oct 29, 2015
    • Surabhil Sergy
    • Francesca Shiekh
    • Lenin Jose Meza Zarco
    • Graham Wells
    • Kristjan Geir Mathiesen

    To add sub panels for related custom  modules:



     add the definition for the sub panel  to the subpanels components:

         $viewdefs[‘<module>’][‘base']['layout']['subpanels']['components'][]  = array (
       'label' => '<LBL_SUBPANEL>',
       'context' => array(
          'link' => '<relationship_name>',


    For Example to add the custom "customer visits" sub panel on Accounts:



        $viewdefs['Accounts']['base']['layout']['subpanels']['components'][] = array (
     'context' => array(
        'link' => 'custv_customer_visits_accounts',
    Where the link is the name of the
    relationship as found in Studio->Accounts->Relationships.                                   

    Critique welcome.