Contact linked to multiple accounts - How do I see all of the accounts to which a contact is linked?

I'm trying to find a way to list the Accounts to which a Contact is linked in a Sub-Panel of the  Contact Record .

When linking a Contact to an Account, the Contact appears in the Accounts Sub-Panel for that Account, and the Account field in the Contact Record is updated to show that link.

The "problem" we have is that when a given Contact is the Purchasing Authority for 5 to 15 locations of a Customer, the Contact Record contains the Account link for the last time the contact was linked.

I'm thinking I may need to create a new Many-to-Many Relationship for Contact-Accounts, but I'm fearful that doing that would disrupt the standard SugarCRM design.

How do I see all of the accounts to which a contact is linked?

Parents
  • Hi Bud,

    When you say "see," are you focused on the recordView specifically? I ask because my intuition tells me you can report on this. But, knowing your extensive experience with Sugar, my instinct is that you are thinking more along the lines of how to see this at the Contact record level.

    There is not a way for the core app to do this in the Contacts RecordView, but I suspect it could be customized at a code level to do it.

    I wonder if it is possible to add an array for an accounts subpanel to the Contact modules subpaneldefs. I saw an old reference to someone adding the following to modules/Contacts/metadata/subpaneldefs.php : 

    $layout_defs['Contacts'] = array(
        // list of what Subpanels to show in the DetailView
        'subpanel_setup' => array(
    
            'accounts' => array(
                'order' => 30,
                'module' => 'Accounts',
                'sort_order' => 'asc',
                'sort_by' => 'name',
                'subpanel_name' => 'default',
                'get_subpanel_data' => 'accounts',
                'add_subpanel_data' => 'account_id',
                'title_key' => 'LBL_ACCOUNTS_SUBPANEL_TITLE',
                'top_buttons' => array(
                    array('widget_class' => 'SubPanelTopCreateAccountNameButton'),
                    array('widget_class' => 'SubPanelTopSelectButton', 'mode' => 'MultiSelect')
                ),
            ),

    I have never personally tried this. When I get a chance, I will experiment with it.

    Regards,
    Patrick McQueen
    Director, SugarCRM Support

Reply
  • Hi Bud,

    When you say "see," are you focused on the recordView specifically? I ask because my intuition tells me you can report on this. But, knowing your extensive experience with Sugar, my instinct is that you are thinking more along the lines of how to see this at the Contact record level.

    There is not a way for the core app to do this in the Contacts RecordView, but I suspect it could be customized at a code level to do it.

    I wonder if it is possible to add an array for an accounts subpanel to the Contact modules subpaneldefs. I saw an old reference to someone adding the following to modules/Contacts/metadata/subpaneldefs.php : 

    $layout_defs['Contacts'] = array(
        // list of what Subpanels to show in the DetailView
        'subpanel_setup' => array(
    
            'accounts' => array(
                'order' => 30,
                'module' => 'Accounts',
                'sort_order' => 'asc',
                'sort_by' => 'name',
                'subpanel_name' => 'default',
                'get_subpanel_data' => 'accounts',
                'add_subpanel_data' => 'account_id',
                'title_key' => 'LBL_ACCOUNTS_SUBPANEL_TITLE',
                'top_buttons' => array(
                    array('widget_class' => 'SubPanelTopCreateAccountNameButton'),
                    array('widget_class' => 'SubPanelTopSelectButton', 'mode' => 'MultiSelect')
                ),
            ),

    I have never personally tried this. When I get a chance, I will experiment with it.

    Regards,
    Patrick McQueen
    Director, SugarCRM Support

Children