Adding notes to leads

Hi all,

I have noticed you can place a note on anything, more or less. I’ve got notes on accounts, and they show up on the details page under history. I’ve also created notes that are related to particular leads, but there’s no similar history section under a lead. Is there a way to enable this history section so that when I check a lead’s details, I can see what notes have been created for that lead?

@Fox

The History section exists for leads by default. What version of SuiteCRM are you using?

Hi, @p.konetskiy ! I’m using:

Version 7.12.8
Sugar Version 6.5.25 (Build 344)

@Fox

Check files:
modules/contacts/metadata/subpaneldefs.php
and
custom/modules/contacts/metadata/subpaneldefs.php
The file in the custom directory has higher priority. There should be a section:

...
        'history' => array(
            'order' => 20,
            'sort_order' => 'desc',
            'sort_by' => 'date_entered',
            'title_key' => 'LBL_HISTORY_SUBPANEL_TITLE',
            'type' => 'collection',
            'subpanel_name' => 'history',   //this values is not associated with a physical file.
            'module' => 'History',

            'top_buttons' => array(
                array('widget_class' => 'SubPanelTopCreateNoteButton'),
                array('widget_class' => 'SubPanelTopArchiveEmailButton'),
                array('widget_class' => 'SubPanelTopSummaryButton'),
                array('widget_class' => 'SubPanelTopFilterButton'),
            ),

            'collection_list' => array(
                'tasks' => array(
                    'module' => 'Tasks',
                    'subpanel_name' => 'ForHistory',
                    'get_subpanel_data' => 'tasks',
                ),
                'tasks_parent' => array(
                    'module' => 'Tasks',
                    'subpanel_name' => 'ForHistory',
                    'get_subpanel_data' => 'tasks_parent',
                ),
                'meetings' => array(
                    'module' => 'Meetings',
                    'subpanel_name' => 'ForHistory',
                    'get_subpanel_data' => 'meetings',
                ),
                'calls' => array(
                    'module' => 'Calls',
                    'subpanel_name' => 'ForHistory',
                    'get_subpanel_data' => 'calls',
                ),
                'notes' => array(
                    'module' => 'Notes',
                    'subpanel_name' => 'ForHistory',
                    'get_subpanel_data' => 'notes',
                ),
                'emails' => array(
                    'module' => 'Emails',
                    'subpanel_name' => 'ForHistory',
                    'get_subpanel_data' => 'emails',
                ),
                'linkedemails' => array(
                    'module' => 'Emails',
                    'subpanel_name' => 'ForUnlinkedEmailHistory',
                    'get_subpanel_data' => 'function:get_unlinked_email_query',
                    'generate_select' => true,
                    'function_parameters' => array('return_as_array' => 'true'),
                ),
            ),
            'searchdefs' => array(
                'collection' =>
                    array(
                        'name' => 'collection',
                        'label' => 'LBL_COLLECTION_TYPE',
                        'type' => 'enum',
                        'options' => $GLOBALS['app_list_strings']['collection_temp_list'],
                        'default' => true,
                        'width' => '10%',
                    ),
                'name' =>
                    array(
                        'name' => 'name',
                        'default' => true,
                        'width' => '10%',
                    ),
                'current_user_only' =>
                    array(
                        'name' => 'current_user_only',
                        'label' => 'LBL_CURRENT_USER_FILTER',
                        'type' => 'bool',
                        'default' => true,
                        'width' => '10%',
                    ),
                'date_modified' =>
                    array(
                        'name' => 'date_modified',
                        'default' => true,
                        'width' => '10%',
                    ),
            ),
        ),
...

Hi, @p.konetskiy !

The section exists in modules/Contacts/metadata/subpaneldefs.php but custom/modules/Contacts/metadata/subpaneldefs.php does not exist.

@Fox

It’s good. You are using the default configuration for the Leads subpanels. Try doing Admin->Repair->Quick Repair and Rebuild.

and also: Admin / Repair relationships

Hi! I believe I’ve figured it out.

The issue seems to have been that I was only ever visiting the ‘edit view’ of leads because the listing of leads that I have doesn’t have a link to the detail view. This might be because of my customization of the fields.

I had to change the handling of the name to make sure I could consistently import existing records from our old system. Here’s what one of the entries looks like:

The ‘Example Lead’ part would normally be highlighted in the default configuration and it would link to the detail view. You can see this working in the Accounts view:

The change I’ve made effectively normalized all names to the ‘last name’ field and then used that as the only field for naming. This meant swapping out whatever was there by default (full_name, maybe?) and replacing it just with the last_name field. I tried swapping out the field with full_name but this didn’t seem to work-- it seems to be empty for the entries.

So, I suppose the question I have now is this: How can I either make last_name a link to the detail view, or else add a link in explicitly, somehow? Thanks!

@Fox

You can create custom/modules/<module_name>/metadata/listviewdefs.php adding two parameter for file last_name.

For an example

...
  'LAST_NAME' =>
  array(
    'width' => '10%',
    'label' => 'LBL_LAST_NAME',
    'default' => true,
    'link' => true, // support link
    'bold' => true, // add tag <b>
  ),
...