Show email history in custom module based on related contact(s)

If I create a custom module based on account or opportunity type in module builder:

Will this custom module show related contacts email history as do the core Accounts/Opportunity modules?


do you mean as subpanels or the actual data within them?

I think I mean this:

How can I get my custom module to show up in

Admin>Developer Tools>History Subpanel

So i can select it and have related contacts email histories show up in a “History” subpanel in my custom module (don’t know how to get that subpanel showing yet either)

Hi @John_EZS,

To show the emails of the contacts in the history of your module:

  • First lookup the link to the contacts by checking for a file that has the word “contact” in the name in the following directory:

  • open this file and look for the line that starts with “name”, like:
    'name' => 'key_module_contacts',
    Take a note of the value, in this example key_module_contacts

  • Look into the following directory for a file that contains the word “activities” and open it

  • look for the part:

      'emails' =>
      array (
        'module' => 'Emails',

In this section:

  • Modify subpanel_name from ‘ForHistory’ to ForUnlinkedEmailHistory’
  • Modify get_subpanel_data from ‘*****_activities_emails’ to ‘function:get_emails_by_assign_or_link’
  • Add an entry and modify key_module_contacts by the value you found in step 2
    'function_parameters' => array('import_function_file' => 'include/utils.php', 'link' => 'key_module_contacts'),
  • Add an entry
    'generate_select' => true,

You should now have something like this (where key_module_conctacts should be replaced by the link you looked up)

'emails' =>
array (
  'module' => 'Emails',
  'subpanel_name' => 'ForUnlinkedEmailHistory',
  'get_subpanel_data' => 'function:get_emails_by_assign_or_link',
  'function_parameters' => array('import_function_file' => 'include/utils.php', 'link' => 'key_module_contacts'),
  'generate_select' => true,
  • Finish by Admin / Repair / “Quick Repair and Rebuild”

To make sure your module can be selected as a parent module for the tasks, emails, notes, calls and meetings,

  • open the Admin / “Dropdown Editor” and add your module to the following list:
    • parent_type_display
    • record_type_display
    • record_type_display_notes


  • “Item Name” should by the technical name for your module, normally in the form “key_module”, exactly like the folder entry under
  • “Display Label” is the label of your module.
1 Like