Can someone tell me what I am doing wrong when creating these subpanels? They are not showing up..

By clicking on the link you can download the package I created.

For some reasons the subpanels don't show up and I can't see what I am doing wrong.Subpanel.zip

  • Hi

    I am not an expert about this but I can see you have this: 

    <?php
    // created: 2018-04-03 06:34:15
    $viewdefs['Accounts']['base']['layout']['subpanels']['components'][] = array (
    'override_subpanel_list_view' =>
    array (
    'view' => 'subpanel-for-accounts_contacts_1',
    'link' => 'accounts_contacts_1',
    ),
    );

    And in a old proyect I have: 

    $viewdefs['Accounts']['base']['layout']['subpanels']['components'][]['override_subpanel_list_view'] = array (
    'link' => 'opportunities',
    'view' => 'subpanel-for-accounts-opportunities',
    );

    And this is an overriden subpanel too.

    I hope it helps you. 

    Regards

  • Hi Amy,

    If you have created the relationships between any modules through studio.

    If you are an admin user. Can you check whether the modules are hided in "Display Modules and Subpanels Section".

    step 1: Go to Admin >>Developer Tools >> Display modules and Subpanels section.

    step 2: Check if your modules are present in "Hidden Subpanels" section.

    step 3: If they are present in Hidden Subpanels, please try to drag and drop the modules from Hidden Subpanels section to Display Modules section and save it.

    If they are not under hidden tab we have to go deeper into issue, why this is not happening.

  • Okay thank you for saying it.

    So, I have seen your zip and I don´t see any error at less this is you are missing:

    custom\modules\<your custom module name>\clients\base\views\subpanel-list

    The last folder name is: subpanel-list I have that folder in my old proyect, and it is Enterprise 7.9 SugarCRM version.

    I don´t think it has changed.

    And I have another one: 

    subpanel-for-contacts-contacts_<your_custom__module_name>_1

    with a file: 

    subpanel-for-contacts-contacts_<your_custom__module_name>_1.php

    In custom\modules\<custom_module>\clients\base\views you must to have:

    record, list, selection-list, supanel-list and all your overridden or added subpanels

    like: 

    subpanel-lev_contracts_subpanel_lev_contracts_lev_courses

     and 

    subpanel-for-contacts-contacts_<your_custom_module_name>_1

    there are some differences

    I think you must to have: 

    subpanel-for-lev_contracts-lev_contracts_lev_courses_1

    Regards. 

  • Relationships.zip

    This is the package that created the custom relationships.

  • Hi

    Since our community friends have covered the most important stuff, I took a quick look at your packages.

    And I *think* you might be missing additional files in your relationships. 

    For a subpanel to work, it expects a "link" between two modules - not just a conceptual link, but a literal "link" field, which is defined in the vardefs.Link usually defines what is the relationship used and what is the module that you're linking to.

    That might be missing "link" that you're looking for. I don't see them in your Relationships.zip.

    Lets take a sample custom module that you have - Lev_Contracts. In order to create the link you have to define an extension, just like how you define the fields, something like:

    custom/Extension/modules/Accounts/Ext/Vardefs/account_lev_contracts_link.php

    <?php
    $dictionary["Account"]["fields"]["accounts_lev_contracts"] = array(
    'name' => 'accounts_lev_contracts',
    'type' => 'link',
    'relationship' => 'accounts_lev_contracts',
    'source' => 'non-db',
    'module' => 'Lev_Contracts',
    'bean_name' => 'Lev_Contracts',
    'vname' => 'LBL_ACCOUNTS_LEV_CONTRACTS',
    );

    Just ensure that the "relationship" name in the link is correct. If you then do a repair and rebuild, the subpanel should start working. Keep us posted if this worked for you.