emails subpanel not showing in opportunity record view

Hi All,

I want to display email subpanel on opportunity record view/detail view , but its not showing for opportunity, but shows for Leads module.

Subpanel not available in Studio -> opportunity -> subpanels.

I have enabled Emails module for Navigation and subpanel.

What might be the root cause for the above, please suggest.

Subpanel file available in "custom/modules/Opportunities/metadata/subpanels/Email_subpanel_opportunities.php".

Kindest Regards,

Shreya

  • ,

    The Opportunities module natively has an Emails subpanel and shouldn't need a custom-defined subpanel. Have you done something to suppress the stock subpanel on the Opportunities module?

    Chris

  • I haven't done any changes but if any changes don by someone where it will be for stock module to hide emails subpanel?

  • If the Emails subpanel is not available for configuration under Admin > Studio > Opportunities > Subpanels, the only user configuration that would impact this would be if the Emails module was disabled under the Subpanel section found in Admin > Navigation Bar and Subpanels (or Admin > Display Modules and Subpanels if you are on pre-13.0).

    If the Emails module is visible in this section, then you would need to search for potential code customizations suppressing the subpanel.

    Chris

  • I would check the file

    custom/modules/Opportunities/Ext/clients/base/layouts/subpanels/subpanels.ext.php

    There you can see if there is any contradictory inclusions due to the multiple points where, programatically, can decide wich subpanels to show.

    This file even gives you clues, via comments, on which "extension" file would have produce eventual contradictions

    Have a nice day

  • Dear Juane,

    Thanks for response!

    I have checked file at location "custom/modules/Opportunities/Ext/clients/base/layouts/subpanels/subpanels.ext.php" but there no code related to Emails.

    Can you please suggest what I have to add to enable Emails module in opportunity?

    Kindest Regards,

    Shreya

  • HI

    Here's what a checked in my Sugacrm v12 devel environment

    - Try to find a type = link entry for "emails" in cache/modules/Opportunities/Opportunityvardefs.php

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    array (
    'name' => 'emails',
    'type' => 'link',
    'relationship' => 'emails_opportunities_rel',
    'source' => 'non-db',
    'vname' => 'LBL_EMAILS',
    )
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    - Create a file based in this entry in custom/Extension/modules/Opportunities/Ext/clients/base/layouts/subpanels/opportunity_emails.php

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    <?php
    $viewdefs['Opportunities']['base']['layout']['subpanels']['components'][] = array (
    'label' => 'LBL_YOUNAMEIT',
    'context' =>
    array (
    'link' => 'emails',
    ),
    'layout' => 'subpanel',
    );
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    BUT it didn't work

    then a followed the relationship emais_opportunities_rel and didn't found any occurrence.
    Shouldn't it be 'opportunity_emails'?

    detailed as

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    array (
    'lhs_module' => 'Opportunities',
    'lhs_table' => 'opportunities',
    'lhs_key' => 'id',
    'rhs_module' => 'Emails',
    'rhs_table' => 'emails',
    'rhs_key' => 'parent_id',
    'relationship_type' => 'one-to-many',
    'relationship_role_column' => 'parent_type',
    'relationship_role_column_value' => 'Opportunities',
    )
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    I'll do some research and come back later.

    Juane

  • DearJuane,

    Thanks for responding!
    I have done code level changes to enable Email subpanel on opportunity as below:
    Added below code:
    "array(
    'layout' => 'subpanel',
    'label' => 'LBL_EMAILS_SUBPANEL_TITLE',
    'override_subpanel_list_view' => 'subpanel-for-opportunities-archived-emails',
    'context' => array (
    'link' => 'archived_emails',
    ),
    ),"

    In the file at location "custom/modules/Opportunities/clients/base/layouts/subpanels/subpanels.php" and then quick repair & rebuild.
    Now Email subpanel is visible in opportunity record view.

    Kindest Regards,
    Shreya 

  • I tried this in a Opportunities' vardef to to check my theory, but no luck at all

    Fullscreen
    1
    $dictionary['Opportunity']['fields']['emails']['relationship']= 'opportunity_emails';
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Lucky you, !
    I tried this in my v12 instance but didn't work. I would have like it running but is not a requirement from my users.

    Thanks for sharing